/changename
#4

Quote:
Originally Posted by Squirrel
Посмотреть сообщение
Here you go, just put the save variables that you have there
PHP код:
CMD:changename(playeridparams[])
{
    new 
name[MAX_PLAYER_NAME],
        
id,
        
pname[MAX_PLAYER_NAME],
        
string[128],
        
nick[20];
    if(
PlayerInfo[playerid][Admin] > 5)
    {
        if(
sscanf(params"us[20]"idnick)) return SendClientMessage(playeridCOLOR_RED"SYNTAX: /changename <playername/id> <nickname>");
        if(
id == INVALID_PLAYER_ID) return SendClientMessage(playeridCOLOR_RED"Invalid-Playerid!");
        if(
IsPlayerNPC(id)) return SendClientMessage(playeridCOLOR_RED"You cannot change NPC Bot's name!");
        
GetPlayerName(idnamesizeof(name));
        
GetPlayerName(playeridpnamesizeof(pname));
        
SetPlayerName(idnick);
        
format(stringsizeof(string), "Administrator %s(ID:%d) has set %s(ID:%d)'s name to %s"pnameplayeridnameidnick);
        
SendClientMessageToAll(COLOR_REDstring);
        
format(stringsizeof(string), "You set %s(ID:%d)'s name to %s"nameidnick);
        
SendClientMessage(playeridCOLOR_GREENstring);
        
format(stringsizeof(string), "Administrator %s(ID:%d) has set your name to %s"pnameplayeridnick);
        
SendClientMessage(idCOLOR_REDstring);
        
format(stringsizeof(string), "ADMIN-SPEC: %s has used /changename"pname);
        
SentMessageToAdmins(COLOR_GREYstring);
    }
    else return 
SendClientMessage(playeridCOLOR_RED"You must be Administrator Level 5 or higher to use this command!");
    return 
1;

Only 1 error: error 017: undefined symbol "Admin"
Reply


Messages In This Thread
/changename - by Blackazur - 23.10.2012, 20:46
Re: /changename - by Squirrel - 23.10.2012, 20:47
Re: /changename - by BreakDriFT - 23.10.2012, 20:51
AW: Re: /changename - by Blackazur - 23.10.2012, 21:05
Re: AW: Re: /changename - by VladCanarez - 24.10.2012, 02:40
Re: /changename - by Abhishek. - 24.10.2012, 02:44

Forum Jump:


Users browsing this thread: 1 Guest(s)