Need help with car body
#1

Hello guys.

I made a small script:

Code:
	if(strcmp(cmdtext, "/fix", true) == 0)
  {
  if(IsPlayerInAnyVehicle(playerid))
  {
  new Float:x, Float:y, Float:z;
  new vehid; new modelid; new Float:rot;
  vehid = GetPlayerVehicleID(playerid);
  modelid = GetVehicleModel(vehid);
  GetVehiclePos(vehid, x, y, z);
  GetVehicleZAngle(vehid, rot);
  DestroyVehicle(vehid);
  CreateVehicle(modelid, x, y, z, rot, -1, -1, 6666);
  SetVehiclePos(vehid, x, y, z);
  PutPlayerInVehicle(playerid, vehid, 0);
  }
  return 1;
  }
But when i type /fix for example im in elegy when i type in /fix the car jumps and it changes color + the player that sits beside you exit the car. I would like to have that command without jumping changing color and the player exiting the car. Or the command /vehgod that if your car has below 999hp it fixs with changing car body.

Thanks, Eryk
Reply


Messages In This Thread
Need help with car body - by XxerykxX - 20.02.2010, 18:57
Re: Need help with car body - by gotenks918 - 20.02.2010, 19:01
Re: Need help with car body - by XxerykxX - 20.02.2010, 19:04
Re: Need help with car body - by gotenks918 - 20.02.2010, 19:07
Re: Need help with car body - by gotenks918 - 20.02.2010, 19:10
Re: Need help with car body - by XxerykxX - 20.02.2010, 19:10
Re: Need help with car body - by gotenks918 - 20.02.2010, 19:11
Re: Need help with car body - by XxerykxX - 20.02.2010, 19:12
Re: Need help with car body - by gotenks918 - 20.02.2010, 19:14
Re: Need help with car body - by XxerykxX - 20.02.2010, 19:15

Forum Jump:


Users browsing this thread: 3 Guest(s)