SetPlayerName not working after format()?
#1

Hello forums.

I try use the forum to get help as little as possible so I work stuff out. But this has stumped me for the past 24 hours...

Here is my first step of the mask command:

pawn Код:
CMD:masktest(playerid, params[]){
    new newName[MAX_PLAYER_NAME];
    format(newName, sizeof(newName), "Mask %d", playerVariables[playerid][pMask]);
    SetPlayerName(playerid, newName);

    return 1;
}
When i use this it just does... nothing.

If i use this though:

pawn Код:
CMD:masktest(playerid, params[]){
    new newName[MAX_PLAYER_NAME];
    format(newName, sizeof(newName), "Mask %d", playerVariables[playerid][pMask]);
    SetPlayerName(playerid, "test");

    return 1;
}
It works fine and changes my name to "test"... any ideas? If you need any other code, just request...

Thanks alot.
Reply
#2

You can't use spaces in SetPlayerName.

https://sampwiki.blast.hk/wiki/SetPlayerName
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)