SA-MP Forums Archive
Cars wont despawn - 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: Cars wont despawn (/showthread.php?tid=633313)



Cars wont despawn - 1fret - 29.04.2017

i made this vehicle system , and i want it to despawn the car when the owner of the vehicle leaves the server.. This is my coding under onplayerdisconnect

PHP код:
    if(pInfo[playerid][vModel])
    {
        
DestroyVehicle(pInfo[playerid][pVeh]);
    }
    if(
pInfo[playerid][vBModel])
    {
        
DestroyVehicle(pInfo[playerid][pBVeh]);
    }
    if(
pInfo[playerid][vVModel])
    {
        
DestroyVehicle(pInfo[playerid][pVVeh]);
    }
    
pInfo[playerid][pVeh]          = 0;
    
pInfo[playerid][pBVeh]         = 0;
    
pInfo[playerid][pVVeh]         = 0



Re: Cars wont despawn - Hansrutger - 29.04.2017

Show us what you have assigned pInfo[playerid][pVeh], pInfo[playerid][pBVeh] and pInfo[playerid][pVVeh] with.


Re: Cars wont despawn - 1fret - 29.04.2017

Quote:
Originally Posted by Hansrutger
Посмотреть сообщение
Show us what you have assigned pInfo[playerid][pVeh], pInfo[playerid][pBVeh] and pInfo[playerid][pVVeh] with.
meaning you want to see what commands i use?


Re: Cars wont despawn - Hansrutger - 29.04.2017

Whatever will provide where you set:

pInfo[playerid][pVeh] = something
pInfo[playerid][pBVeh] = something
pInfo[playerid][pVVeh] = something


Re: Cars wont despawn - 1fret - 29.04.2017

pInfo[playerid][pBVeh] = 0;


Re: Cars wont despawn - 1fret - 30.04.2017

bump