/makeadmin help needed - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /makeadmin help needed (
/showthread.php?tid=150468)
/makeadmin help needed -
Madykevy - 26.05.2010
Hi,
I've made a /makeadmin command but i have an error that i can't fix.
pawn Код:
error 033: array must be indexed (variable "name")
And yes i have:
pawn Код:
new name[MAX_PLAYER_NAME];
He is giving the error on this line:
pawn Код:
format(string, sizeof(string), "** Admin %s has made %s a level %d admin.", PlayerInfo[playerid][name], PlayerInfo[giveplayerid][name], level);
Re: /makeadmin help needed -
DJDhan - 26.05.2010
Use:
Код:
new pname[MAX_PLAYER_NAME];
new adminName[MAX_PLAYER_NAME];
GetPlayerName(player1, playername, sizeof(playername));
GetPlayerName(playerid, adminname, sizeof(adminname));
format(string, sizeof(string), "** Admin %s has made %s a level %d admin.", adminname,playername,level);