Help Car Delete But No Lost
#1

Hi Guys can help for car spawn system? cant Lost after exit vehicle

Code:
CMD:v(playerid,params[])
{
	new car;
	new string[128];
	new Float:X, Float:Y, Float:Z;
	GetPlayerPos(playerid, Float:X, Float:Y, Float:Z);
	if(sscanf(params,"i", car)) return SendClientMessage(playerid,0xff0000ff,"USAGE: /v <Vehicle ID 400 - 611>");
	else if(car < 400 || car >611) return SendClientMessage(playerid, 0xff0000ff, "ERROR: ID Vehicle tidak valid!");
	{
	if(Vehicle[playerid] != 0)
	{
		DestroyVehicle(Vehicle[playerid]);
	}
	Vehicle[playerid] = CreateVehicle(car, X, Y, Z + 2.0, 0, -1, -1, 1);
	format(string,sizeof(string),"Kamu berhasil spawn kendraan ID %i",car);
	SendClientMessage(playerid, 0xffffffff, string);
	PutPlayerInVehicle(playerid, Vehicle[playerid], 0);
	}
	return 1;
}
Reply
#2

what is the error?
Reply
#3

You most probably have some code inside OnPlayerExitVehicle or OnPlayerStateChanged where you destroy your vehicle. Search for "Vehicle[playerid]" in your gamemode and you'll find that code.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)