27.10.2016, 13:38
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:
I have one error, can I have some help?
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;
}
Код:
C:\Servers\racing_samp\gamemodes\race.pwn(1594) : error 017: undefined symbol "IsValidVehicle" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

