Pls help me VehicleSpawn Error
#1

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 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]);
				}
		    }
		}
Reply
#2

Bump sorry
Reply
#3

Do you call SetVehicleToRespawn in OnVehicleSpawn at all?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)