/car - warning exception - 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: /car - warning exception (
/showthread.php?tid=377871)
/car - warning exception -
Seven_of_Nine - 15.09.2012
hello,
now I have this: (the part when the player is being put in the veh)
Код:
new Float:iPos[2+1],Float:iAngle;
RemovePlayerFromVehicle(playerid);
DestroyVehicle(pDetails[playerid][aCar]);
GetPlayerFacingAngle(playerid,iAngle);
GetPlayerPos(playerid,iPos[0],iPos[1],iPos[2]);
pDetails[playerid][aCar] = CreateVehicle(cModel,iPos[0],iPos[1],iPos[2],iAngle,iColor[0],iColor[1],0);
PutPlayerInVehicle(playerid,pDetails[playerid][aCar],0);
and I get this: Warning(s007): Exception 0xC0000005 at 0x47F8B2
BUT! this only occurs when typing /car while IN A CAR already. otherwise, it doesn't.
could you please help me? or maybe even check it out if it does for you too?
Re: /car - warning exception -
ThePrograme - 15.09.2012
show the line of the warning
Re: /car - warning exception -
Seven_of_Nine - 15.09.2012
Hehe, I could've fixed it if it displayed the line.
It's an in-game warning..
Also, it crashes if I spawn another vehicle than i am in already. >.<
Re: /car - warning exception -
denNorske - 15.09.2012
okay, then use:
pawn Код:
if(IsPlayerInAnyVehicle(playerid))return SendClientMessage(playerid, colorhere. "you are not able to spawn a car while beeing in one")
else if(!IsPlayerInAnyVehicle(playerid)){
//your current code
}
Re: /car - warning exception -
Seven_of_Nine - 15.09.2012
Quote:
Originally Posted by airplanesimen
okay, then use:
pawn Код:
if(IsPlayerInAnyVehicle(playerid))return SendClientMessage(playerid, colorhere. "you are not able to spawn a car while beeing in one") else if(!IsPlayerInAnyVehicle(playerid)){ //your current code }
|
That's the last option but I really wanna make it so it spawns you a car anyways.