/car - warning exception
#1

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

show the line of the warning
Reply
#3

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

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
}
Reply
#5

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


Forum Jump:


Users browsing this thread: 1 Guest(s)