Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //••••••••••••••••••••••••••••••••••••••••••••••••••••
- //•• Translated by Ehab Isaac. Created by : DraKon.
- #include <a_samp>
- #define MEUS_SLOTS 20
- //************ Cores **************************
- #define AMARELO 0xFFFF00AA
- #define VERDE 0x33AA33A
- //********** Arrays ***************************
- new CintoPlayer[MEUS_SLOTS];
- //***************** CallBakcs (Detectar Batida *****************
- public OnVehicleDamageStatusUpdate(vehicleid, playerid)
- {
- if(CintoPlayer[playerid] == 0)
- {
- new Float:Px = 0.000000, Float:Py = 0.000000, Float:Pz = 0.000000, Float:Pa = 0.000000, Float:HV ;
- GetPlayerPos(playerid, Px, Py, Pz);//PEGA POS
- GetPlayerFacingAngle(playerid, Pa);//PEGA ANGULO
- GetVehicleHealth(vehicleid,HV);
- SetPlayerHealth(playerid,HV/10);
- SetPlayerPos(playerid,Px+2,Py+2,Pz+1);
- RemovePlayerFromVehicle(playerid);//REMOVE VEICULO
- ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
- ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
- SendClientMessage(playerid,AMARELO,"[WARNING]: See? That's happens when you evade the belt! I hope you learned from this crash that you put the seatbelt next time.");
- SetTimer("ANIM",5000,0);
- SetPlayerWantedLevel(playerid, 1);
- }
- return 1;
- }
- //************ CallBacks Para Anims **************************
- forward ANIM(playerid);
- public ANIM(playerid)
- {
- ClearAnimations(playerid);
- return 1;
- }
- //*************** Call Backs Entra Veiculos ******************
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- CintoPlayer[playerid] = 0;
- GameTextForPlayer(playerid, "~r~/seatbelt, ~n~Don't Evade that! You are risking your life when you evade the SeatBelt! You can drive safely.", 3000, 4);
- return 1;
- }
- //******** Call Backs Comandos *******************************
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(!strcmp(cmdtext, "/seatbelt", true))
- {
- CintoPlayer[playerid] = 1;
- SendClientMessage(playerid,VERDE,"[SERVER]: Yes, don't evade it! You're doing great! Always when you drive, put the Seatbelt. If you want to remove it type:(/takeseatbeltoff)");
- SetPlayerWantedLevel(playerid, 0);
- return 1;
- }
- if(!strcmp(cmdtext, "/takeseatbeltoff", true))
- {
- CintoPlayer[playerid] = 0;
- SendClientMessage(playerid,AMARELO,"[WARNING]: You are risking your life! Your life is in danger now! Don't ride anything without putting the SeatBelt.");
- SetPlayerWantedLevel(playerid, 0);
- return 1;
- }
- if(!strcmp(cmdtext, "/seatbelthelp", true))
- {
- SendClientMessage(playerid,AMARELO,"/seatbelt to put the Seatbelt around your body, to be safe! Drive safely now!");
- SendClientMessage(playerid,AMARELO,"/takeseatbeltoff to remove the Seatbelt from around your body. That's not safe while driving!");
- return 1;
- }
- return 0;
- }
- //*************** The End *************************************
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement