Blocked command in car.
#1

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.
Reply
#2

add this to the command
Код:
IsPlayerInAnyVehicle(playerid) return SendClientMessage(playerid,COLOR_RED,"you cant do this command in vehicle");
Reply
#3

Add this under the command:
pawn Код:
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,-1,"you cant use this command if you are in a vehicle.");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)