How to reget the origin player name
#4

PHP код:
// for origin name
new NameOriginAfk[MAX_PLAYERS][MAX_PLAYER_NAME];
// for origin name
COMMAND:afk(playeridparams[])
{
    
SendAdminText(playerid"/afk"params);
    if (
APlayerData[playerid][LoggedIn] == false) return 0;
    new 
Name[24], string[128], AFKName[25];
    
TogglePlayerControllable(playerid,0);
    
GetPlayerName(playeridNamesizeof(Name));
    
GetPlayerName(playeridAFKNamesizeof(AFKName));
     
format(stringsizeof(string),"%s[afk]"AFKName);
    
SetPlayerName(playeridstring);
    
format(stringsizeof(string),"Le joueur %s c'est mis afk !"Name);
    
SendClientMessageToAll(0xFFFFFFstring);
    
// message afk
    
SendClientMessage(playerid,0xFFFFFFFF"Vous etes maintenant afk !");
    return 
1;
}
COMMAND:stopafk(playeridparams[])
{
    
SendAdminText(playerid"/stopafk"params);
    if (
APlayerData[playerid][LoggedIn] == false) return 0;
    new 
Name[24], string[128], AFKName[25];
    
TogglePlayerControllable(playerid,1);
    
GetPlayerName(playeridNamesizeof(Name));
    
GetPlayerName(playeridAFKNamesizeof(AFKName));
     
format(stringsizeof(string),"%s"AFKName);
    
SetPlayerName(playeridNameOriginAfk);
    
format(stringsizeof(string),"Le joueur %s est de retour !"Name);
    
SendClientMessageToAll(0xFFFFFFstring);
    
// message afk
    
SendClientMessage(playerid,0xFFFFFFFF"Vous etes maintenant de retour !");
    return 
1;

like that ? but i getting error

Код:
C:\Users\XXXX\Desktop\Serveur SAMP\gamemodes\XXX.pwn(17982) : error 048: array dimensions do not match
Edit : and when i use your idea Sjn i get somes errors.
Reply


Messages In This Thread
How to reget the origin player name - by Eymeric69 - 17.05.2016, 14:51
Re: How to reget the origin player name - by SyS - 17.05.2016, 14:54
Re: How to reget the origin player name - by Sjn - 17.05.2016, 14:59
Re: How to reget the origin player name - by Eymeric69 - 17.05.2016, 15:03
Re: How to reget the origin player name - by Konstantinos - 17.05.2016, 15:14
Re: How to reget the origin player name - by GhostHacker - 17.05.2016, 15:18
Re: How to reget the origin player name - by SyS - 17.05.2016, 15:20
Re: How to reget the origin player name - by Sjn - 17.05.2016, 15:23
Re: How to reget the origin player name - by Eymeric69 - 17.05.2016, 15:25
Re: How to reget the origin player name - by bgedition - 17.05.2016, 18:11

Forum Jump:


Users browsing this thread: 1 Guest(s)