- 0
ajutor script
-
Similar Content
-
- 0 replies
- 193 views
-
- 0 replies
- 89 views
-
- 3 replies
- 508 views
-
- 4 replies
- 167 views
-
- 5 replies
- 374 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
star69
new MaxRepair = 1000; new RepairMaxPrice = 1000; public RepairPVehicle(playerid) { new RepairMsg[128], Float:health; // Get the vehicle-id of the player's vehicle new vID = GetPlayerVehicleID(playerid); GetVehicleHealth(vID, health); // Calculate the amount of fuel that needs to be Repairled new Amount = MaxRepair - health; // Calculate the price to Repair new RepairPrice = (Amount * RepairMaxPrice) / MaxRepair; // Check if the player has enough cash if (PlayerInfo[playerid][pCash] >= RepairPrice) { // Repair the vehicle RepairVehicle(vID); // Withdraw the money from the player RewardPlayer(playerid, -RepairPrice, 0); // Let the player know he Repairled his vehicle format(RepairMsg, 128, TXT_RepairedVehicle, RepairPrice); SendClientMessage(playerid, 0xFFFFFFFF, RepairMsg); } else SendClientMessage(playerid, 0xFFFFFFFF, TXT_CannotRepairVehicle); // Allow the player to move again TogglePlayerControllable(playerid, 1); return 1; }
Ceva nu functioneaza cum trebuie.
Acest script repara masina, daca masina e stricata mai tare imi da bani cu - adica imi da bani in loc sa-mi ia si trece de limita impusa de mine MaxRepairPrice
Link to comment
Share on other sites
1 answer to this question
Recommended Posts