SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 20/02/2010, 06:57 PM   #1
XxerykxX
Big Clucker
 
Join Date: Aug 2008
Posts: 162
Reputation: 0
Default Need help with car body

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
XxerykxX is offline  
Old 20/02/2010, 07:01 PM   #2
gotenks918
Huge Clucker
 
Join Date: May 2007
Posts: 202
Reputation: 0
Default Re: Need help with car body

Why not use the function RepairVehicle() ?
Code:
if(strcmp(cmdtext, "/fix", true) == 0)
{
	if(IsPlayerInAnyVehicle(playerid))
	{
	    new vehicleid = GetPlayerVehicleID(playerid);
	    RepairVehicle(vehicleid);
	}
	return 1;
}
gotenks918 is offline  
Old 20/02/2010, 07:04 PM   #3
XxerykxX
Big Clucker
 
Join Date: Aug 2008
Posts: 162
Reputation: 0
Default Re: Need help with car body

can you explain me or just give me script :/

getting

Code:
error 017: undefined symbol "RepairVehicle"
    warning 204: symbol is assigned a value that is never used: "vehicleid"
XxerykxX is offline  
Old 20/02/2010, 07:07 PM   #4
gotenks918
Huge Clucker
 
Join Date: May 2007
Posts: 202
Reputation: 0
Default Re: Need help with car body

Just edited post, i'm also new scripting not sure if it will work XD
gotenks918 is offline  
Old 20/02/2010, 07:10 PM   #5
gotenks918
Huge Clucker
 
Join Date: May 2007
Posts: 202
Reputation: 0
Default Re: Need help with car body

Are you using 0.3?
gotenks918 is offline  
Old 20/02/2010, 07:10 PM   #6
XxerykxX
Big Clucker
 
Join Date: Aug 2008
Posts: 162
Reputation: 0
Default Re: Need help with car body

edited the post i put on top of gamemode

#define RepairVehicle

just getting warning now : warning 215: expression has no effect
XxerykxX is offline  
Old 20/02/2010, 07:11 PM   #7
gotenks918
Huge Clucker
 
Join Date: May 2007
Posts: 202
Reputation: 0
Default Re: Need help with car body

You shouldn't need to define the function, it's built in to 0.3
gotenks918 is offline  
Old 20/02/2010, 07:12 PM   #8
XxerykxX
Big Clucker
 
Join Date: Aug 2008
Posts: 162
Reputation: 0
Default Re: Need help with car body

my pawno version is 1.0 LOL

Is it the newest??
XxerykxX is offline  
Old 20/02/2010, 07:14 PM   #9
gotenks918
Huge Clucker
 
Join Date: May 2007
Posts: 202
Reputation: 0
Default Re: Need help with car body

It's not the pawno version you need to worry about... Go on to the main sa-mp website and look for the 0.3a server files, download them and try and recompile with that.
gotenks918 is offline  
Old 20/02/2010, 07:15 PM   #10
XxerykxX
Big Clucker
 
Join Date: Aug 2008
Posts: 162
Reputation: 0
Default Re: Need help with car body

I do have now i get you so can you help me with it ??
XxerykxX is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Car Repair Body And NOS Abdulla_Alnuaimi Help Archive 2 26/05/2010 05:05 AM
Body Stays in until... Namaco Help Archive 5 22/12/2009 08:17 PM
Evian effects on your body LOL! [IB]Scorcher Everything and Nothing 15 20/09/2009 07:10 AM


All times are GMT. The time now is 03:43 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.