Need help with Admin Name system. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Need help with Admin Name system. (
/showthread.php?tid=386665)
Need help with Admin Name system. -
tsonn1 - 21.10.2012
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.
Re: Need help with Admin Name system. -
zT KiNgKoNg - 21.10.2012
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;
}
Re: Need help with Admin Name system. -
tsonn1 - 21.10.2012
I already have it done. I'm using MySQL.
Re: Need help with Admin Name system. -
tsonn1 - 21.10.2012
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.
Re: Need help with Admin Name system. -
tsonn1 - 21.10.2012
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.
Re: Need help with Admin Name system. -
adithegman - 21.10.2012
Show us the hole script... ican't figure out what's wrong...
Re: Need help with Admin Name system. -
tsonn1 - 22.10.2012
Anyone?