SA-MP Forums Archive
Crash with Remote Control Barron - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP (https://sampforum.blast.hk/forumdisplay.php?fid=3)
+--- Forum: Bug Reports (https://sampforum.blast.hk/forumdisplay.php?fid=20)
+--- Thread: Crash with Remote Control Barron (/showthread.php?tid=344754)



Crash with Remote Control Barron - Mikeyfry - 22.05.2012

I must say, I have no mods!!!
When RC Barron (ID:464) Destroy near the player. Then SAMP Crash: Exception At Address: 0x0040FB80 or: Exception At Address: 0x007F3825, or: Exception At Address: 0x0041ABA2, etc ...
Code for testing. Need more then 1 player. Or use timer for state on foot. when plane Destroy:
PHP код:
//Up of You'r code
new RCBarron[MAX_PLAYERS];
if(
strcmp(cmd"/RCstart"true) == 0)
{
SetPlayerPos(playerid,-1927.3469,308.4812,47.7031);
RCBarron[playerid] = CreateVehicle(464,-1927.3469,308.4812,47.703130100000);//create RC Barron
PutPlayerInVehicle(playeridRCBarron[playerid], 0);
return 
1;
}
if(
strcmp(cmd"/RCstop"true) == 0)
{
SetPlayerPos(playerid,-1927.3469,308.4812,47.7031);
DestroyVehicle(RCBarron[playerid]);//<--- samp crash. When this action occurs. And when player in range of Barron plane
return 1;

P.S. On the other RC models RC Bandit (ID:441), RC Tiger (ID:564) и RC Goblin (ID:501) crashes does not occur (!!!)
I'm tested it on 0.3d and 0.3e.
Hope this will fix.


Re: Crash with Remote Control Barron - rscaerzx - 23.06.2012

Try RemovePlayerFromVehicle before using DestroyVehicle


Re: Crash with Remote Control Barron - CmZxC - 13.07.2012

When he already used SetPlayerPos, he will automatically leave the vehicle..
You can try to set vehicle at some unknown far away position and then destroy it, for example
0.0, 0.0, -50.0


Re: Crash with Remote Control Barron - Coles - 16.07.2012

its not removing the play from the vehicle in time for the car to destroy maybe still making the error occur maybe have a timer to delay in by a second or something try that