LoadVehicles heelp
#5

try this code for destroy personal vehicles

Код:
stock strmatch(const String1[], const String2[])
{
	if((strcmp(String1, String2, true, strlen(String2)) == 0) && (strlen(String2) == strlen(String1)))
	{
		return true;
	}
	else
	{
		return false;
	}
}

Put this code in OnPlayerDisconnect

for(new i = 1; i <= GetVehiclePoolSize(); i++)
{
	if(strmatch(xVehicle[i][xv_Sahip], GetName(playerid))
	{
		DestroyVehicle(i);
	}
}

stock GetName(playerid)
{
	new name[25];
	if(playerid == INVALID_PLAYER_ID) format(name, 25, "Unknow");
	else GetPlayerName(playerid, name, 25);
	return name;
}
Reply


Messages In This Thread
LoadVehicles heelp - by Man43 - 20.04.2017, 10:00
Re: LoadVehicles heelp - by Man43 - 20.04.2017, 10:08
Re: LoadVehicles heelp - by skuller12 - 20.04.2017, 10:38
Re: LoadVehicles heelp - by Man43 - 20.04.2017, 10:39
Re: LoadVehicles heelp - by skuller12 - 20.04.2017, 10:46
Re: LoadVehicles heelp - by Man43 - 20.04.2017, 10:51
Re: LoadVehicles heelp - by skuller12 - 20.04.2017, 10:54
Re: LoadVehicles heelp - by Man43 - 20.04.2017, 17:18
Re: LoadVehicles heelp - by Man43 - 20.04.2017, 19:51
Re: LoadVehicles heelp - by Man43 - 21.04.2017, 19:57

Forum Jump:


Users browsing this thread: 2 Guest(s)