01.02.2012, 23:03
new personalvevicle[MAX_PLAYERS] = { -1, ... };
Onplayerdisconnect: Destroypersonalvehicle(playerid);
Createpersonalvehicle(playerid, model)
{
destroypersonalvehicle(playerid);
Personalvehicle[playerid] = CreateVehicle(model, ....);
}
destroypersonalvehicle(playerid)
{
if(Personalvehicle[playerid] != -1)
{
DestroyVehicle(personalvehicle[playerid]);
personalvehicle[playerid] = -1;
}
}
Onplayerdisconnect: Destroypersonalvehicle(playerid);
Createpersonalvehicle(playerid, model)
{
destroypersonalvehicle(playerid);
Personalvehicle[playerid] = CreateVehicle(model, ....);
}
destroypersonalvehicle(playerid)
{
if(Personalvehicle[playerid] != -1)
{
DestroyVehicle(personalvehicle[playerid]);
personalvehicle[playerid] = -1;
}
}