[BEGINNER] Need help destroying vehicles
#1

Hello,
I have started writing my first script from scratch recently, and I need help with two functions:
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/freecar", cmdtext, true, 8) == 0)
	{
		new Float:x, Float:y, Float:z;
		GetPlayerPos(playerid,x,y,z);
		CreateVehicle(542,x,y,z,90,-1,-1,0);
		return 1;
	}
	return 0;
}
Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
	if (GetPlayerVehicleSeat(playerid) == 0)
	{
	    DestroyVehicle(vehicleid);
	    return 1;
	}
	return 0;
}
So my question is: is there any easy way to do that only cars which were created with /freecar command would be destroyed upon exit? At the moment any vehicle is destroyed and not respawning.
Reply


Messages In This Thread
[BEGINNER] Need help destroying vehicles - by dovys11 - 30.03.2014, 18:20
Re: [BEGINNER] Need help destroying vehicles - by dovys11 - 30.03.2014, 19:00
Re: [BEGINNER] Need help destroying vehicles - by Evocator - 30.03.2014, 19:09
Re: [BEGINNER] Need help destroying vehicles - by dovys11 - 30.03.2014, 19:16

Forum Jump:


Users browsing this thread: 1 Guest(s)