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

Quote:
Originally Posted by dominik523
Посмотреть сообщение
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))
...
This worked, thanks for the help!
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)