Crash with Remote Control Barron
#1

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.
Reply
#2

Try RemovePlayerFromVehicle before using DestroyVehicle
Reply
#3

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
Reply
#4

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)