SA-MP Forums Archive
Onvehicledeath - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Onvehicledeath (/showthread.php?tid=370495)



Onvehicledeath - Visio - 20.08.2012

I have a big problem
when the car dies the server network data with the server is lost
This happens when a ownablecar is explode but when a not ownable car is explode all is ok

that's the script
Код:
public OnVehicleDeath(vehicleid,killerid)
{
    for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
    {
    new idcar =  GetPlayerVehicleID(playerid);
    if(IsAnOwnableCar(vehicleid) && CarInfo[vehicleid][cOwned] == 1)
	{
    CarInfo[idcar][cTD]++;
    OnPropUpdate(); SavePlayerData(playerid);
    }
    }
    return 1;
}



Re: Onvehicledeath - Visio - 20.08.2012

oh thank you