[Ajuda] AFK Sistema
#5

Se vocк quer utilizar o params, vocк pode fazer desse modo:

PHP код:
//Topo do GM:
new bool:IsPlayerAFK[MAX_PLAYERS];
CMD:afk(playeridparams[]) {
    if(
isnull(params)) return SendClientMessage(playerid,cor_vermelho,"/afk [on/off]");
    new 
string[64];
    if(!
strcmp(params,"on",true)) {
        
IsPlayerAFK[playerid] = true;
        
SetPlayerPos(playerid322.197998,302.497985,999.148437);
        
SetPlayerInterior(playerid5);
        
SetPlayerHealth(playerid9999);
        
ResetPlayerWeapons(playerid);
        
format(stringsizeof string"o Jogador (%s) Estб no /AFK"PlayerName(playerid));
        
SendClientMessageToAll(COR_ERROstring);
    else if(!
strcmp(params,"off",true)) {
        
IsPlayerAFK[playerid] = false;
        
SpawnPlayer(playerid);
        
SetPlayerInterior(playerid0);
        
SetPlayerHealth(playerid100);
        
SetPlayerArmour(playerid100);
        
format(stringsizeof string"o Jogador (%s) Saiu Do AFK /sairafk"PlayerName(playerid));
        
SendClientMessageToAll(COR_ERROstring);
    }
    return 
1;

Reply


Messages In This Thread
AFK Sistema - by JuniorTheDM - 24.07.2015, 00:19
Re: AFK Sistema - by iMFear - 24.07.2015, 00:24
Re: AFK Sistema - by Thider - 24.07.2015, 00:26
Re: AFK Sistema - by Thider - 24.07.2015, 00:31
Re: AFK Sistema - by s4kuL - 24.07.2015, 00:36

Forum Jump:


Users browsing this thread: 2 Guest(s)