Blocked command in car. - 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)
+--- Thread: Blocked command in car. (
/showthread.php?tid=511378)
Blocked command in car. -
Sting. - 05.05.2014
Alright I have a simple strcmp /shop command but I want to block it when he person is in a car which actually leads to gun abuse cause they can buy anything and just use it in a drive-by. Well drive-by is allowed in my script but only the selected guns. How do I block the /shop command when the player is in a vehicle. (They must be on foot to use the command)
+REP
Thanks in advance.
Re: Blocked command in car. -
Xeinss - 05.05.2014
add this to the command
Код:
IsPlayerInAnyVehicle(playerid) return SendClientMessage(playerid,COLOR_RED,"you cant do this command in vehicle");
Re: Blocked command in car. -
XK - 05.05.2014
Add this under the command:
pawn Код:
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,-1,"you cant use this command if you are in a vehicle.");