28.10.2012, 21:23
Hey, Im making a Fix command for Mechanic class, But it doesn't repair the vehicle..
And I have to be in the vehicle, I want it so it repairs the vehicle outside of the car
Any help would be appreciated.
Here is my code
And I have to be in the vehicle, I want it so it repairs the vehicle outside of the car
Any help would be appreciated.
Here is my code
Код:
CMD:fix(playerid, params[]) { new aName[MAX_PLAYER_NAME], taName[MAX_PLAYER_NAME], vehicleid, targetid ; vehicleid = GetClosestVehicle(playerid); GetPlayerName(playerid, aName, sizeof(aName)); GetPlayerName(targetid, taName, sizeof(taName)); if(gTeam[playerid] == ASSISTANCE) { if (IsPlayerInVehicle(targetid, vehicleid)) { RepairVehicle(GetPlayerVehicleID(vehicleid)); SendClientMessage(playerid, COLOR_WHITE, "You have Succesfully repaired the Vehicle."); return 1; } else return SendClientMessage(playerid, RED, "ERROR: You are not near a vehicle!"); } return 1; }