Need help with Admin Name system.
#1

Hi!

I need a little help with my /aod command.
I made an admin name system to my server and I want the name to change, when I type /aod.

Here's the line:
pawn Код:
SetPlayerName(playerid, "%s", PlayerInfo[playerid][pAName]);
And I also want the name to change back.
Reply
#2

you will need to load some string

Example
pawn Код:
enum pInfo
{
    pAName[500],
}
pawn Код:
INI_String("name", PlayerInfo[playerid][pAName],200);
pawn Код:
CMD:aname(playerid,Params[])
{
        if(PlayerInfo[playerid][pAdmin] >=1)
        {

             SetPlayerName(playerid, "%s", PlayerInfo[playerid][pAName]);  
             return 1;
        }
    return 1;
}
Reply
#3

I already have it done. I'm using MySQL.
Reply
#4

Wait. Where should I put the INI thing?

Edit: I found an error from my server log:
pawn Код:
[13:12:33] sscanf error: SSCANF_SetPlayerName has incorrect parameters.
Reply
#5

I made a little change:
pawn Код:
SetPlayerName(playerid, PlayerInfo[playerid][pAName]);
And it works now, but I've got a new problem. When I type /aod In-Game, the server just crashes. No errors in server log.
Reply
#6

Show us the hole script... ican't figure out what's wrong...
Reply
#7

Anyone?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)