31.07.2011, 18:24
Hello everyone, I would like to hear from you if these features can be good or how I can improve: in OnPlayerDisconnect then how can I do?
public OnPlayerConnect:
public OnPlayerDisconnect:
public OnPlayerConnect:
Код:
for(new i, MaxPlayers = GetMaxPlayers(); i < MaxPlayers; i++) { if(IsPlayerConnected(i)) { GetPlayerName(playerid, Nome[playerid], 24); format(stringa, sizeof stringa, "%s (ID:%d) has joined the server", Nome[playerid], playerid); SendClientMessageToAll(-1, stringa); GameTextForPlayer(playerid, "~b~Benvenuto su~n~~g~I~w~L~r~V ~y~SA-MP Server~n~~b~Versione~n~~r~v0.1~n~~b~Ultimo aggiornamento~n~~r~31/07/2011", 7000, 3); //GAMETEXTFORPLAYER } }
Код:
GetPlayerName(playerid, Nome[playerid], 24); switch(reason) { case 0: format(stringa, sizeof stringa, "%s has left the server (Crash)", Nome[playerid]); case 1: format(stringa, sizeof stringa, "%s has left the server", Nome[playerid]); case 2: { format(stringa, sizeof stringa, "%s has left the server (Kicked/Banned)", Nome[playerid]); PlayCrimeReportForPlayer(playerid, playerid, 3); } } SendClientMessageToAll(-1, stringa);