[Solved] spawn with car where u died bug
#1

why isnt this working? i dont understand what am i doing wrong when the car explodes the car isnt there. but when i die in the car its fine.

Код:
new Float:xpos1, Float:ypos1, Float:zpos1;
new Float:Anglepos1;
new Float:vzrot;
new mycarid;

public OnPlayerDeath(playerid, killerid, reason)
{
	GetPlayerFacingAngle(playerid, Anglepos1);
  	GetPlayerPos(playerid,xpos1,ypos1,zpos1);
 	
  	GetVehiclePos(playerid,xpos1,ypos1,zpos1);
  	mycarid=GetPlayerVehicleID(playerid);
  	GetVehicleZAngle(mycarid, vzrot);
}

public OnPlayerSpawn(playerid)
{
	SetPlayerFacingAngle( playerid, Anglepos1);
  	SetPlayerPos(playerid, xpos1, ypos1, zpos1);
  	
  	SetVehiclePos(mycarid,xpos1,ypos1,zpos1);
  	GetVehicleZAngle(mycarid, vzrot);
  	PutPlayerInVehicle(playerid, mycarid, 0);
	return 1;
}
Reply
#2

also i see the that already blown up car spawns to me . i thinks thats the issue but what can i do to spawn a new car ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)