Making a command to lock/unlock the owners car in a radius.
#2

You need to finish your command with returning 1 if I'm right.
Код:
return doors -> return 1;
EDIT:
Also, function GetPlayerVehicleID only work if player is in any vehicle. That's why your command is working only when the player is in the car. You need to create a vehicle when the player joins the server and then save vehicleid to your variable. For example:
pawn Код:
enum pInfo
{
     pVehModel,
     pVehicle
};
new PlayerData[MAX_PLAYERS][pInfo];
// under on player connect
if(PlayerData[playerid][pVehModel])
     pVehicle = CreateVehicle(...);

// and in your command
GetVehiclePos(PlayeData[playerid][pVeh], x, y, z);
If(IsPlayerInRangeOfPoint(playerid, 4, x, y, z))
...
Reply


Messages In This Thread
Making a command to lock/unlock the owners car in a radius. - by TryHardSnipr - 30.10.2014, 21:56
Re: Making a command to lock/unlock the owners car in a radius. - by dominik523 - 30.10.2014, 22:22
Re: Making a command to lock/unlock the owners car in a radius. - by TryHardSnipr - 30.10.2014, 22:25
Re: Making a command to lock/unlock the owners car in a radius. - by TryHardSnipr - 31.10.2014, 09:31

Forum Jump:


Users browsing this thread: 1 Guest(s)