SA-MP Forums Archive
[Ajuda] AFK - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] AFK (/showthread.php?tid=583022)



AFK - JuniorTheDM - 25.07.2015

PHP код:
        CMD:afk(playeridparams[])
        {
        new 
string[64], motivo[64];
        if(!
AFK[playerid])
        {
        if(
sscanf(params"s[128]"motivo))
        {
        
SendClientMessage(playerid, -1"Digite: /afk [motivo]");
        return 
1;
        }
        {
        
format(stringsizeof string"[AFK]O Jogador {00BFFF}(%s) {FFFFFF}Estб AFK, Motivo: {00BFFF}%s"PlayerName(playerid), motivo);
        
SendClientMessageToAll(-1string);
        }
        
SetPlayerPos(playerid322.197998,302.497985,999.148437);
        
SetPlayerInterior(playerid5);
        
SetPlayerHealth(playerid9999);
        
ResetPlayerWeapons(playerid);
        
AFK[playerid] = true;
        }
    else
    {
        
SpawnPlayer(playerid);
        
SetPlayerInterior(playerid0);
        
SetPlayerHealth(playerid100);
        
SetPlayerArmour(playerid100);
        
AFK[playerid] = false;
        
format(stringsizeof string"o Jogador {00BFFF}(%s){FFFFFF} Saiu Do AFK !"PlayerName(playerid));
        
SendClientMessageToAll(01string);
    }
    return 
1;

QUANDO USO /AFK SO APARECE ISSO
[AFK]O Jogador {00BFFF}(%s) {FFFFFF}Estб AFK, Moti


Re: AFK - JonathanFeitosa - 25.07.2015

Aumenta o new string pra 128 ao invйs de 64