Aller au contenu principal

OnPlayerSpawn

Paramètres

Cette callback est appelée lorsqu'un joueur spawn (apparaît).

NomDescription
int playeridL'ID du joueur qui spawn.

Valeur de retour

Retournez 0 pour forcer le joueur à retourner à la sélection de classe au prochain spawn.

Exemple

public OnPlayerSpawn(playerid)
{
new PlayerName[MAX_PLAYER_NAME],
string[40];

GetPlayerName(playerid, PlayerName, sizeof(PlayerName

format(string, sizeof(string), "[ ! ] %s a spawn.", PlayerName);
SendClientMessageToAll(0xFFFFFFFF, string);

return 1;
}

Astuces

astuce

Le jeu déduit parfois $100 à un joueur après son apparition.

Fonctions connexes