08.10.2016, 12:45
So I have edited the command like you said.
The health is still the same after I edit the health number see screenshots:
http://imgur.com/PAJhotr
http://imgur.com/mT2ZqUP
The command:
The health is still the same after I edit the health number see screenshots:
http://imgur.com/PAJhotr
http://imgur.com/mT2ZqUP
The command:
PHP код:
CMD:setvehiclehealth(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 3)
{
SendClientMessage(playerid, COLOR_GREY, "You're not allowed to use this command.");
}
if(AdminDuty[playerid] != 1 && PlayerInfo[playerid][pAdmin] < 6)
{
SendClientMessage(playerid,COLOR_WHITE, "You're not on-duty as admin. To access your admin commands you must be on-duty. Type /aduty to go on-duty.");
}
new Float:VehicleHealth, string[125];
new vehicleid = GetPlayerVehicleID(playerid);
if(sscanf(params, "fd", Float:VehicleHealth, vehicleid)) return SendClientMessage(playerid, COLOR_GREEN, "/setvehiclehealth [Health] [VehicleID]");
format(string, sizeof(string),"You have set your vehicle health to %f",Float:VehicleHealth);
SendClientMessage(playerid, COLOR_GRAD1, string);
SetVehicleHealth(vehicleid, Float:VehicleHealth);
return 1;
}

