if (strcmp, if it is an Admin - 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: if (strcmp, if it is an Admin (
/showthread.php?tid=149757)
if (strcmp, if it is an Admin -
Ihsan_Cingisiz - 23.05.2010
How can i do this?
Quote:
if (strcmp("/heal", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_YELLOW, "You are succefully healed!");
SetPlayerHealth(playerid, 100);
return SendClientMessage(playerid,COLOR_RED,"Sorry, you are not a Admin!");
}
|
I want to do this, but i forgot how i can make this only for admins..
So if a non-admin types /heal it says you aren ot a admin and if a
admin does this is must heal the player to 100 HP...
Re: if (strcmp, if it is an Admin -
[MWR]Blood - 23.05.2010
pawn Код:
if (strcmp("/heal", cmdtext, true, 10) == 0)
{
if(IsPlayerAdmin(playerid)) // That means RCON Admin.
{
SendClientMessage(playerid, COLOR_YELLOW, "You are succefully healed!");
SetPlayerHealth(playerid, 100);
}
else
{
SendClientMessage(playerid,COLOR_RED,"Sorry, you are not a Admin!");
}
return 1;
}
Re: if (strcmp, if it is an Admin -
Ihsan_Cingisiz - 23.05.2010
Quote:
Originally Posted by ikarus❶❸❸❼
pawn Код:
if (strcmp("/heal", cmdtext, true, 10) == 0) { if(IsPlayerAdmin(playerid)) // That means RCON Admin. { SendClientMessage(playerid, COLOR_YELLOW, "You are succefully healed!"); SetPlayerHealth(playerid, 100); } else {
SendClientMessage(playerid,COLOR_RED,"Sorry, you are not a Admin!"); } return 1; }
|
Thank you very very much, do you know how i can do /kick and then ID?
So if im an admin and i do /kick [Name/ID]...
And a /veh command to spawn a vehicle.. Thanks