07.03.2010, 01:54
gente й o seguinte onplayerdisconect e onplayerconect simplesmente pararam de funcionar!!!
aki ta o codigo deles
obrigado!!
aki ta o codigo deles
pawn Код:
public OnPlayerConnect(playerid)
{
GameTextForPlayer(playerid,"~g~s~y~e~g~r~y~v~g~e~y~r ~g~b~y~r",5000,5);
SendPlayerFormattedText(playerid, "~w~Bem-vindo ao server BR.", 0);
gActivePlayers[playerid]++;
gLastGaveCash[playerid] = GetTickCount();
new var0[24], var1[46];
GetPlayerName(playerid, var0, 24);
format(var1, 46, "* %s entrou no servidor", var0);
SendClientMessageToAll(0x33AA33AA, var1);
return 1;
}
//------------------------------------------------------------------------------------------------------
public OnPlayerDisconnect(playerid, reason)
{
Object_OnPlayerDisconnect(playerid, reason);
gActivePlayers[playerid]--;
new var0[24], var1[63];
GetPlayerName(playerid, var0, 24);
switch(reason) {
case 0:
format(var1, 63, "%s saiu do server. (Caiu)", var0);
case 1:
format(var1, 63, "%s saiu server. (Saiu)", var0);
case 2:
format(var1, 63, "%s saiu do sever. (Kickado/Banido)", var0);
}
SendClientMessageToAll(0x33AA33AA, var1);
return 1;
}