setcarhp command
#1

Hello, I wanna have a command that it's usage is: "/setcarhp [Target Vehicle ID] [Health]."
How can I edit the vehicle's HP, and how can I make it by the vehicle ID, and how can I check if this vehicle ID even exists? thanks!

EDIT:
I made it to here:
Код:
	CMD:setcarhp(playerid, params[]){
	new vehicleid, health;
	if(sscanf(params, "ui", vehicleid, health))return SendClientMessage(playerid, 0x33AA33AA, "USAGE: /setcarhp[Target Vehicle ID] [Health]");
	if(!IsValidVehicle(vehicleid)) return SendClientMessage(playerid, 0x33AA33AA, "This vehicle ID isn't valid..");
	if(health < 250 || health > 1250) return SendClientMessage(playerid, 0x33AA33AA, "That health isn't realistic");
	SetVehicleHealth(vehicleid, health);
	SendClientMessage(playerid, 0x33AA33AA, "You changed the health of the vehicle.");
	return 1;
	}
I have one error, can I have some help?
Код:
C:\Servers\racing_samp\gamemodes\race.pwn(1594) : error 017: undefined symbol "IsValidVehicle"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
Reply


Messages In This Thread
setcarhp command - by XpoZzA - 27.10.2016, 13:38
Re: setcarhp command - by Dignity - 27.10.2016, 13:49

Forum Jump:


Users browsing this thread: 1 Guest(s)