13.12.2013, 19:35
If i make a command /opcar and the script will be like SetCarHealth 500000 will it have that much health?
if(strcmp("/opcar", cmdtext, true) == 0) { new vehicleid = GetPlayerVehicleID(playerid); SetVehicleHealth(vehicleid, 1000); SendClientMessage(playerid, COLOUR_WHITE, "The vehicles engine has been fully repaired."); return 1; }
The default health for all vehicles is 1000, this is not the maximum you can set it to whatever you like using SetVehicleHealth. Increasing the value will simply mean it will be allowed to take more damage before it explodes.
Something that may also interest you is that different vehicles take different values of damage on collisions with objects or other vehicles however weapons do the same amount of damage to any vehicle, so a Rhino can be destroyed in the same amount of bullets it takes to destroy a Tractor. (Note that all vehicles will catch on fire and explode at 250.0 health) Hope this helps you out. EDIT: You can also use the command "/DL" in-game which will show a 3D text on every vehicle stating various information about it including its current health, this may help you with debugging and troubleshooting when using the SetVehicleHealth function. |
do like this
Код:
if(strcmp("/opcar", cmdtext, true) == 0) { new vehicleid = GetPlayerVehicleID(playerid); SetVehicleHealth(vehicleid, 1000); SendClientMessage(playerid, COLOUR_WHITE, "The vehicles engine has been fully repaired."); return 1; } |
I know that full hp is 1k but if i set it to 50k will it make it more tanky?
|