[HELP] Police cmds - 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] Police cmds (
/showthread.php?tid=79591)
[HELP] Police cmds -
FreddeN - 29.05.2009
Now it's time to script some police mcds like /pullover /stop or /freeze...
I know how to make the cmd but I only want the team cops "team 9" to use it.
So if you are a civilian and tries to type /pullover it shall say "You ar not a Police Officer"...
Thanks for the help, and this is the script a'm going to use:
Код:
if(!strcmp(cmdtext, "/pullover", true, 9))
{
new str[256], pname[256];
GetPlayerName(playerid, pname, 256);
format(str, 256, "Officer %s Shouts:", pname, cmdtext[9]);
SendClientMessageToAll(0x0000BBAA, str);
return 1;
Re: [HELP] Police cmds -
Ignas1337 - 29.05.2009
if you use SetPlayerTeam use
pawn Код:
if(GetPlayerTeam(playerid) != 9){/*you're not a cop*/} else {/* you're a cop, yuou shout :P*/}