Pls help me VehicleSpawn Error - 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: Pls help me VehicleSpawn Error (
/showthread.php?tid=479481)
Pls help me VehicleSpawn Error -
bigtigerbeee - 05.12.2013
19:30:26] [debug] Run time error 5: "Invalid memory access"
[19:30:26] [debug] AMX backtrace:
[19:30:26] [debug] #0 00022e3c in public OnVehicleSpawn (0x000000a4) from tolrp.amx
[19:30:26] [debug] #1 native SetVehicleToRespawn () [0046ea50] from SAMP-S~1.EXE
[19:30:26] [debug] #2 000abe04 in public cmd_respawn (0x00000001, 0x005141d
![Cool](images/smilies/cool.gif)
from tolrp.amx
[19:30:26] [debug] #3 native CallLocalFunction () [00471ef0] from SAMP-S~1.EXE
[19:30:26] [debug] #4 00001b48 in public GPA_OnPlayerCommandText (0x00000001, 0x005141a4) from tolrp.amx
[19:30:26] [debug] #5 native CallLocalFunction () [00471ef0] from SAMP-S~1.EXE
[19:30:26] [debug] #6 0000070c in public OnPlayerCommandText (0x00000001, 0x00514170) from tolrp.amx
Код:
foreach(new i: Player)
{
if(vehicleid == PlayerInfo[i][pVeh])
{
SetVehicleParamsEx(vehicleid, 0, 0, 0, PlayerInfo[i][vLocked], 0, 0, 0);
ChangeVehiclePaintjob(PlayerInfo[i][pVeh], PlayerInfo[i][vPJ]);
SetVehicleVirtualWorld(PlayerInfo[i][pVeh], PlayerInfo[i][pVehVW]);
for(new x=0; x<14; i++)
{
AddVehicleComponent(PlayerInfo[i][pVeh], PlayerInfo[i][pVehMod][x]);
}
}
if(vehicleid == PlayerInfo[i][pVVeh])
{
SetVehicleParamsEx(vehicleid, 0, 0, 0, PlayerInfo[i][vvLocked], 0, 0, 0);
ChangeVehiclePaintjob(PlayerInfo[i][pVVeh], PlayerInfo[i][vvPJ]);
SetVehicleVirtualWorld(PlayerInfo[i][pVVeh], PlayerInfo[i][pVVehVW]);
for(new x=0; x<14; i++)
{
AddVehicleComponent(PlayerInfo[i][pVVeh], PlayerInfo[i][pVVehMod][x]);
}
}
}
Re: Pls help me VehicleSpawn Error -
bigtigerbeee - 05.12.2013
Bump sorry
Re: Pls help me VehicleSpawn Error -
Konstantinos - 05.12.2013
Do you call SetVehicleToRespawn in OnVehicleSpawn at all?