28.11.2010, 00:17
Em OnPlayerConnect:
pawn Код:
//No comeзo gm
new SA[MAX_PLAYERS];
forward AtualizarCabeзa();
//Em OnGameModInit
SetTimer("AtualizarCabeзa", 6000, true);
//em OnPlayerCommandText
if(strcmp("/sa", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
SA[playerid] = 1;
}
}
if(strcmp("/sairsa", true) == 0)
{
if(SA[playerid] == 1)
{
SA[playerid] = 0;
}
}
//nO FINAL DO GM
public AtualizarCabeзa()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
if(SA[playerid] == 1)
{
SetPlayerChatBubble(i, "Posso Ajudar?",COR , 100.0, 10000);//playerid, texto, cor, distancia, tempo q ira ficar.
}
}
}
return 1;
}