SA-MP Forums Archive
[Ajuda] Como Faзo Isso - 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] Como Faзo Isso (/showthread.php?tid=448801)



Como Faзo Isso - iJooaO - 05.07.2013

PHP Code:
 if(PlayerInfo[playerid][pSocio] >= 4)
                {
                        new 
SocioName[MAX_PLAYER_NAME];
                        new 
string[128];
                        
GetPlayerName(playeridSocioNamesizeof(SocioName));
                        
format(stringsizeof(string), "~y~Socio Diamante: ~n~ ~p~%s: ~w~~r~off",SocioName);
                        for(new 
i=0i<MAX_PLAYERSi++)
                        {
                        if(
IsPlayerConnected(i)) GameTextForAll(string50005);
                        }
                }
                
TempoLogin SetTimerEx("LoginAgora"100000"i"playerid);
        }
        return 
1;

Como ponho pra quando o player fica off aparecer isso mais da error


Re: Como Faзo Isso - TheKoDaK - 05.07.2013

Manda o erro que da


Re: Como Faзo Isso - lucaspilar - 06.07.2013

Vocк colocou na public OnPlayerDisconnect ?


Re: Como Faзo Isso - Knight97 - 06.07.2013

Pode explicar? Nгo percebi..


Re: Como Faзo Isso - lucaspilar - 06.07.2013

Quote:
Originally Posted by Knight97
View Post
Pode explicar? Nгo percebi..
ele quer tipo: Um admin sai do servidor ai aparece:
ADM: Fulano Offline

mais ele quer como socio tipo:
Socio Diamante: Fulano Off


Re: Como Faзo Isso - [THs]ShadoW - 06.07.2013

Quote:
Originally Posted by iJooaO
View Post
PHP Code:
 if(PlayerInfo[playerid][pSocio] >= 4)
                {
                        new 
SocioName[MAX_PLAYER_NAME];
                        new 
string[128];
                        
GetPlayerName(playeridSocioNamesizeof(SocioName));
                        
format(stringsizeof(string), "~y~Socio Diamante: ~n~ ~p~%s: ~w~~r~off",SocioName);
                        for(new 
i=0i<MAX_PLAYERSi++)
                        {
                        if(
IsPlayerConnected(i)) GameTextForPlayer(istring50005);
                        }
                }
                
TempoLogin SetTimerEx("LoginAgora"100000"i"playerid);
        }
        return 
1;

Como ponho pra quando o player fica off aparecer isso mais da error
Nгo seria ?


Re: Como Faзo Isso - Knight97 - 06.07.2013

OnPlayerDisconnect:
pawn Code:
if(PlayerInfo[playerid][pSocio] >= 4)
{
    new
        SocioName[MAX_PLAYER_NAME],
        string[128];

    GetPlayerName(playerid, SocioName, sizeof(SocioName));
    format(string, sizeof(string), "~y~Socio Diamante: ~n~ ~p~ %s: ~w~ ~r~ off", SocioName);
    GameTextForAll(string, 5000, 5);
   
    return true;
}
Nгo tem necessidade de criar loop se podia usar a funзгo GameTextForAll.