Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- /*
- * O sistema usa uma public adaptada quando o veículo toma algum dano:
- - Link: https://pastebin.com/BgLJFBhg
- */
- new bool:vehicleBroken[MAX_VEHICLES];
- main(){}
- public OnVehicleTakeDamage(vehicleid, playerid, Float:newhealth, Float:oldhealth)
- {
- if(!vehicleBroken[vehicleid] && (oldhealth - newhealth) >= 150.0)
- {
- vehicleBroken[vehicleid] = true;
- RemovePlayerFromVehicle(playerid);
- SetVehicleHealth(vehicleid, 250.0);
- SendClientMessage(playerid, -1, "* Você bateu o veículo muito forte e ele quebrou.");
- }
- return 1;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid)
- {
- if(vehicleBroken[vehicleid])
- return SendClientMessage(playerid, -1, "* Este veículo está quebrado e não pode ser conduzido."), ClearAnimations(playerid);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment