SA-MP Forums Archive
/po (Pull Over!) - 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: /po (Pull Over!) (/showthread.php?tid=67871)



/po (Pull Over!) - CJ101 - 05.03.2009

how could i make this cmd

/po [id]

tells the player to pull the vehicle over!
(must be cop to use)


Re: /po (Pull Over!) - Grim_ - 05.03.2009

pawn Код:
if(strcmp(cmdtext, "/po", true) == 0)
{
 if(IsACop[playerid] == 1) //your check for a cop
 {
   //assuming its for roleplay...
   for(new i = 0; i<MAX_PLAYERS; i++)
   {
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    if(PlayerToPoint(50, i, x, y, z))
    {
      SendClientMessage(playerid, color, "**A nearby cop shouts PULL OVER NOW!!!");
    }
   }
   return 1;
 }
 else
 {
   SendClientMessage(playerid, color, "Not allowed to use this command!");
 }
 return 1;
}