SA-MP Forums Archive
DestroyVehicle problem - 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: DestroyVehicle problem (/showthread.php?tid=309587)



DestroyVehicle problem - lamarr007 - 08.01.2012

Hi, I adding vehicles by AddStaticVehicle().
So, I have function DestroyVehicle(vehicleid) if player exit vehicle.
And I set re-spawn time in gl_commons.inc to 1 minute.
And the vehicle wonґt respawn after 1 minute !
Can you help me ?


Re: DestroyVehicle problem - Outcast - 08.01.2012

Show us the code please.


Re: DestroyVehicle problem - lamarr007 - 08.01.2012

pawn Код:
new DesVehid[MAX_PLAYERS];

public OnPlayerExitVehicle(playerid, vehicleid)
{
    if(GetPlayerState(playerid)==PLAYER_STATE_DRIVER)
    {
    DesVehid[playerid]=vehicleid;
    SetTimerEx("DesVeh",2000,0,"i",playerid);
    }
    return 1;
}

forward DesVeh(playerid);
public DesVeh(playerid)
{
    DestroyVehicle(DesVehid[playerid]);
    return 1;
}



Re: DestroyVehicle problem - lamarr007 - 08.01.2012

Can you help me please ?