/name command
#1

How do I script a command for a person to do :

/name [input text]?

All I want to know is how do i script the command, and change their name to what they type?
Reply
#2

You can found it in admin filterscripts.
pawn Код:
//Example with zcmd & sscanf
CMD:name(playerid, params[])
{
    if(IsPlayerAdmin(playerid))
    {
        new id, newname[MAX_PLAYER_NAME];
        if(sscanf(params, "ds", id, newname)) return SendClientMessage(playerid, -1, "Syntax: /name [newname]");
        SetPlayerName(id, newname);
        SendClientMessage(playerid, -1, "The player name has changed.");
        return true;
    }
    return false;
}
Reply
#3

pawn Код:
if(sscanf(params,"ds[128]",id,newname))
You forgot the length.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)