12.08.2011, 18:53
Aqui estб, /afk e /voltarafk
pawn Код:
public OnPlayerCommandText(playerid,cmdtext[])
{
if(strcmp(cmdtext,"/afk",true)==0)
{
new s[128],n[24];
GetPlayerName(playerid,n,24);
format(s,sizeof(s),"'%s' estб AFK (/afk)",n);
SendClientMessageToAll(-1,s);
SetPlayerDrunkLevel (playerid, 50000);
SetPlayerCameraPos(playerid, -678.3082,-4514.4253,-92.2059);
SetPlayerCameraLookAt(playerid, -678.3082,-4514.4253,-92.2059);
SetPlayerChatBubble(playerid, "JOGADOR AFK",-1 , 10.0, 1600000);
TogglePlayerControllable(playerid,0);
SendClientMessage(playerid,-1,"Vocк estб AFK (/voltarafk para voltar)");
return true;
}
if(strcmp(cmdtext,"/voltarafk",true)==0)
{
new s[128],n[24];
GetPlayerName(playerid,n,24);
format(s,sizeof(s),"'%s' voltou do AFK (/voltarafk)",n);
SendClientMessageToAll(-1,s);
SetPlayerChatBubble(playerid,"",-1,10.0,1);
SetCameraBehindPlayer(playerid);
SetPlayerDrunkLevel(playerid, 0);
TogglePlayerControllable(playerid,1);
SendClientMessage(playerid,-1,"Vocк voltou do AFK (/afk para voltar)");
return true;
}
return false;
}