SA-MP Forums Archive
Removing Object 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: Removing Object Problem (/showthread.php?tid=596813)



Removing Object Problem - SupperRobin6394 - 22.12.2015

Hey hey,

Another problem, I want some objects placed by a Player to get removed when he dies, it is a RoadBlock and this is what I have under OnPlayerDeath:
PHP код:
    DestroyObject(RoadBlockObject[playerid]);
    
RoadBlock[playerid] = 0
I got this to create the object (inside the CMD):
PHP код:
            RoadBlockObject[playerid] = CreateObject(979XYZ-0.300Angle);
            
RoadBlock[playerid] = 1
Anyone?


Re: Removing Object Problem - TwinkiDaBoss - 22.12.2015

Quote:
Originally Posted by SupperRobin6394
Посмотреть сообщение
Hey hey,

Another problem, I want some objects placed by a Player to get removed when he dies, it is a RoadBlock and this is what I have under OnPlayerDeath:
PHP код:
    DestroyObject(RoadBlockObject[playerid]);
    
RoadBlock[playerid] = 0
I got this to create the object (inside the CMD):
PHP код:
            RoadBlockObject[playerid] = CreateObject(979XYZ-0.300Angle);
            
RoadBlock[playerid] = 1
Anyone?
Add under OnPlayerDeath

PHP код:
DestroyObject(RoadBlockObject[playerid]); 
    
RoadBlock[playerid] = 0;  
printf("Destroyed Object: %i",RoadBlockObject[playerid]); 
And post what happends