SA-MP Forums Archive
[HELP] RE: 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] RE: Police cmds (/showthread.php?tid=79593)



[HELP] RE: Police cmds - FreddeN - 29.05.2009

On my last post I explained it wrong... and it's harder to edit it, so I make a new one...
I want it like, if I type /pullover, a messae gonna pop up to all of the players on the server that says "Officer %s Says Pull Over Now!".
Oh and yes, I also want only cops to use the cmd, I have SetPlayerTeam(playerid,9);

Thanks



Re: [HELP] RE: Police cmds - Castle - 29.05.2009

try using proxdetector and format that might help ya


Re: [HELP] RE: Police cmds - FreddeN - 29.05.2009

Quote:
Originally Posted by Castle
try using proxdetector and format that might help ya
So you dont know how the script look like?


Re: [HELP] RE: Police cmds - member - 29.05.2009

something as simple as this?

pawn Код:
if(!strcmp(cmdtext, "/pullover", true, 9))
    {
        if(GetPlayerTeam(playerid) != 9) return SendClientMessage(playerid, 0x00E100FF, "You need to be a cop to do that!");
        new string[128];
        new adminname[MAX_PLAYER_NAME];
        GetPlayerName(playerid,adminname,sizeof(adminname));
        format(string, sizeof(string),"**Officer %s says Pull Over Now!",adminname);
        SendClientMessageToAll(0x00E100FF, string);
        return 1;
    }
That will just send all the players in your server a message saying "Officer [Your name] says Pull Over Now!".

You can make it more advance such as /pullover [id/part of name] or pullover players next to you.