31.10.2011, 01:05
I tried to make a command to heal all cars it was a massive failure...
It code went thru but vehicles never got healed.. I tried to blow them up see if i can crash the server but really i trying to make a command to heal all cars just for special days heh..
Any pointers
Here the code...
It code went thru but vehicles never got healed.. I tried to blow them up see if i can crash the server but really i trying to make a command to heal all cars just for special days heh..
Any pointers
Here the code...
pawn Код:
CMD:healallcars(playerid, params[])
{
if(PlayerInfo[playerid][pAdminLevel] < 10) SendClientMessage(playerid, ERROR, "Your Not Authorized");
else {
new Float:amount;
if(sscanf(params,"i",amount)) SendClientMessage(playerid, WARNING, "Command Didnt Work.. Or did Just remove this warning");
else {
if(amount < 0 || amount > 1000) SendClientMessage(playerid, WARNING, "UM Didnt Work Try 0 or 1000");
else {
new veh = GetPlayerVehicleID(veh);
SetVehicleHealth(veh, amount);
new string[256];
new adminname[MAX_PLAYER_NAME];
GetPlayerName(playerid, adminname, sizeof(adminname));
format(string, 256, "%s(%d) has set All Cars Too %.1f.", adminname,playerid,amount);
PlayerAnn(GREEN,string, 5);
}
}
}
return 1;
}