Small Problem. - 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: Small Problem. (
/showthread.php?tid=194112)
Small Problem. -
[SU]Balli - 28.11.2010
Hey,
finally i got Seif + LAdmin mixed, and everything works fine
just i need help @ this :
pawn Код:
if(strcmp(cmd, "/hide", true) == 0) // Hides you from the admin list
{
if(PlayerInfo[playerid][Level] >= 2) //|| IsPlayerAdmin(playerid))
GetPlayerName(playerid, sendername, sizeof(sendername));
{
if (Hide[playerid] != 0) return SendClientMessage(playerid,RED,"You're already hidden from the adminlist!");
Hide[playerid] = 1;
format(string, sizeof(string), "Administrator %s is now OFF Admin-Duty.", sendername);
SendClientMessageToAll(baige3,string);
}
return 1;
}
Its for Admins level 2 only, but if a normal non-admin types in game /hide
then this appears :"Administrator is now off Admin-Duty."
Also if i add above return 1;
else return SendClientMessage(playerid,color, "You need to be level2 to use this command");
Then it gives me a error :/
Can someone help me?
![Shocked](images/smilies/surprised.gif)
~Balli
Re: Small Problem. -
WillyP - 28.11.2010
new string[40];?
Re: Small Problem. -
Mokerr - 28.11.2010
pawn Код:
if(strcmp(cmd, "/hide", true) == 0) // Hides you from the admin list
{
if(PlayerInfo[playerid][Level] >= 2) //|| IsPlayerAdmin(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if (Hide[playerid] != 0) return SendClientMessage(playerid,RED,"You're already hidden from the adminlist!");
Hide[playerid] = 1;
format(string, sizeof(string), "Administrator %s is now OFF Admin-Duty.", sendername);
SendClientMessageToAll(baige3,string);
}
else
{
SendClientMessage(playerid, color, "You need to be level2 to use this command");
return 1;
}
return 1;
}
Re: Small Problem. -
[SU]Balli - 28.11.2010
Tyvm, works