19.12.2009, 03:09
I have the following command, it doesnt give me any errors but when i use the command it doesnt repair the vehicle but it still sends the message that the vehicle has been repaired, the visible damage does not go away.
I want it to only be available to the pLeader 1 (police faction leader) ie. the if(PlayerInfo[playerid][pLeader] == 1)
Now will th else SendClientMessage(playerid, RED, "You're not driving a vehicle!"); be sent if the player is not in a vehicle or if he is not the pLeader of faction 1 or is it both?
Thanks for the help.
Ps i have searched and cant seem to find out why it wont get rid of the damage, it may repair the car but the damage is till visible
Код:
// Police Comissioner Repair// if(strcmp(cmdtext, "/pdrepair", true) == 0) { if(GetPlayerState(playerid) == 2) if(PlayerInfo[playerid][pLeader] == 1) { SetVehicleHealth(GetPlayerVehicleID(playerid),1000.0); SendClientMessage(playerid, GREEN, "Your Car has been Repaired"); } else SendClientMessage(playerid, RED, "You're not driving a vehicle!"); }
Now will th else SendClientMessage(playerid, RED, "You're not driving a vehicle!"); be sent if the player is not in a vehicle or if he is not the pLeader of faction 1 or is it both?
Thanks for the help.
Ps i have searched and cant seem to find out why it wont get rid of the damage, it may repair the car but the damage is till visible