Lock/Unlock Car from outside
#8

Quote:
Originally Posted by Steve1312
Посмотреть сообщение
Getplayerpos wasnt finished.
Anyway still isnt working
Код:
command(vehtest, playerid, params[])
{
	new carid = GetClosestVehicle(playerid, 5.0);
	new Float:cx, Float:cy, Float:cz;
        GetVehiclePos(carid, cx, cy, cz);
	if(IsPlayerInRangeOfPoint(playerid, 5.0, cx,cy,cz))
	{
		SendClientMessage(playerid, WHITE, "Y.");
	}
	return 1;
}
Are you sure that you are near a vehicle ?
Код:
command(vehtest, playerid, params[])
{
	new carid = GetClosestVehicle(playerid, 5.0),
		Float:cx, Float:cy, Float:cz;

	GetVehiclePos(carid, cx, cy, cz);

	if(carid == INVALID_VEHICLE_ID)
		return SendClientMessage(playerid, WHITE, "You aren't close to any vehicle !");

	if(IsPlayerInRangeOfPoint(playerid, 5.0, cx,cy,cz))
	{
		SendClientMessage(playerid, WHITE, "Y.");
	}
	return 1;
}
Reply


Messages In This Thread
Lock/Unlock Car from outside - by Steve1312 - 03.08.2014, 22:27
Re: Lock/Unlock Car from outside - by IstuntmanI - 03.08.2014, 22:28
Re: Lock/Unlock Car from outside - by Steve1312 - 04.08.2014, 15:10
Re: Lock/Unlock Car from outside - by Stanford - 04.08.2014, 15:14
Re: Lock/Unlock Car from outside - by Steve1312 - 04.08.2014, 15:21
Re: Lock/Unlock Car from outside - by Stanford - 04.08.2014, 15:24
Re: Lock/Unlock Car from outside - by Steve1312 - 04.08.2014, 15:36
Re: Lock/Unlock Car from outside - by IstuntmanI - 04.08.2014, 15:41
Re: Lock/Unlock Car from outside - by Steve1312 - 04.08.2014, 15:43
Re: Lock/Unlock Car from outside - by Stanford - 04.08.2014, 17:02

Forum Jump:


Users browsing this thread: 1 Guest(s)