HELP]Admin commands - 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: HELP]Admin commands (
/showthread.php?tid=208338)
HELP]Admin commands -
tronix096 - 08.01.2011
Код:
C:\Documents and Settings\Antonio\Desktop\SERVER\gamemodes\GM0.pwn(303) : error 028: invalid subscript (not an array or too many subscripts): "pAdmin"
C:\Documents and Settings\Antonio\Desktop\SERVER\gamemodes\GM0.pwn(303) : warning 215: expression has no effect
C:\Documents and Settings\Antonio\Desktop\SERVER\gamemodes\GM0.pwn(303) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Antonio\Desktop\SERVER\gamemodes\GM0.pwn(303) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Antonio\Desktop\SERVER\gamemodes\GM0.pwn(303) : fatal error 107: too many error messages on one line
i have new: new pAdmin[MAX_PLAYERS];
Код:
if(strcmp(cmd, "/ahelp", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(pAdmin[playerid] > 1)
{
SendClientMessage(playerid,COLOR_WHITE," .:: - ADMIN Help - ::.");
}else{
SendClientMessage(playerid,COLOR_GREY,"* You are not an higher level to use this command!");
}
}
return 1;
}
help
Re: HELP]Admin commands -
Lorenc_ - 08.01.2011
pawn Код:
if(strcmp(cmd, "/ahelp", true) == 0)
{
if(pAdmin[playerid] < 1) return SendClientMessage(playerid,COLOR_GREY,"* You are not an higher level to use this command!");
SendClientMessage(playerid,COLOR_WHITE," .:: - ADMIN Help - ::.");
return 1;
}
Try that.
Re: HELP]Admin commands -
Kyosaur - 08.01.2011
You didnt declare pAdmin as an array.
Next time you might want to show your declarations as well btw :P.
Re: HELP]Admin commands -
tronix096 - 08.01.2011
What?
Re: HELP]Admin commands -
Kyosaur - 08.01.2011
Show us your declaration of pAdmin (search for "new pAdmin").