IsPlayerAdmin - 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: IsPlayerAdmin (
/showthread.php?tid=163738)
IsPlayerAdmin -
Kevin_Joshen - 28.07.2010
Hey there, one more question...
i have on my server so that people can choose their player colors.... here is one example of one;
Код:
}
if(listitem==4)
{
SetPlayerColor(playerid,COLOR_WHITE);
SendClientMessage(playerid,COLOR_WHITE,"This is your new colour.");
i was wondering how to make it so that i can have admin colors.... this is what i have so far..
Код:
}
if(listitem==5)
{
if(!IsPlayerAdmin(playerid))
SetPlayerColor(playerid,COLOR_KHAKI);
SendClientMessage(playerid,COLOR_WHITE,"This is your new Admin Color.");
{
else
}
SendClientMessage(playerid,COLOR_ORANGE,"You Are Not An Admin!");
can you please help me?
when i compile it i get this error
Код:
C:\Users\owner\Desktop\my samp server\my samp server - Copy\gamemodes\stunt.pwn(4286) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
thanks!
Re: IsPlayerAdmin -
selten98 - 28.07.2010
i thought like this:
pawn Код:
}
if(listitem == 5)
{
if(IsPlayerAdmin(playerid)) {//checks if player is Admin
SetPlayerColor(playerid,COLOR_KHAKI);
SendClientMessage(playerid,COLOR_WHITE,"This is your new Admin Color.");
return 1;
}
}
else
{
SendClientMessage(playerid,COLOR_ORANGE,"You Are Not An Admin!");
return 1;
}
Re: IsPlayerAdmin -
Kevin_Joshen - 28.07.2010
your right. thank you!
Re: IsPlayerAdmin -
Kevin_Joshen - 28.07.2010
i just tested this in game and this is what it does;
it sends the client a message like 6x saying "You are not an admin" (i am using XTremeAdmin2 and am a admin lvl 10)
then it sets the players color to that color anyways!
please help.
Re: IsPlayerAdmin -
selten98 - 28.07.2010
Quote:
Originally Posted by Kevin_Joshen
i just tested this in game and this is what it does;
it sends the client a message like 6x saying "You are not an admin" (i am using XTremeAdmin2 and am a admin lvl 10)
then it sets the players color to that color anyways!
please help.
|
FOR THIS you need to login as RCON
Re: IsPlayerAdmin -
Kevin_Joshen - 28.07.2010
so how do i make it so that normal non admin players can not change their color to that?