Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
- * Sistema de Cinto By: Joao_VS *
- * *
- * FilterScript Criado Por Joao_VS *
- * Se usar, manter os creditos. *
- *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
- #include <a_samp>
- #include <a_players>
- #define Roxo 0x8013E1FF
- #define Verde 0x33AA33A
- #define FILTERSCRIPT
- #define Amarelo 0xFFFF00AA
- #define Vermelho 0xFF000096
- forward Tontura(playerid);
- new CINTOSEG[MAX_PLAYERS];
- new Float:VeicleHealt ;
- public OnFilterScriptInit()
- {
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if(newstate == PLAYER_STATE_DRIVER)
- {
- SendClientMessage(playerid,Amarelo,"Você está sem cinto, use /usar-cinto para se proteger! ");
- }
- return 1;
- }
- public OnVehicleDamageStatusUpdate(vehicleid, playerid)
- {
- if(CINTOSEG[playerid] == 0)
- {
- GetPlayerHealth(playerid, VeicleHealt);
- SetPlayerHealth(playerid,VeicleHealt-7);
- SendClientMessage(playerid,Vermelho,"[BML] Você bateu sem o cinto de segurança, se machucou por isso! ");
- SetTimer("Tontura",10000,0);
- SetPlayerDrunkLevel(playerid, 30000);
- }
- return 1;
- }
- public Tontura(playerid)
- {
- SetPlayerDrunkLevel(playerid, 0);
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(!strcmp(cmdtext, "/usar-cinto", true))
- {
- CINTOSEG[playerid] = 1;
- SendClientMessage(playerid,Verde,"[BML]: Você está usando cinto, agora está protegido! (/tirar-cinto)");
- SetPlayerWantedLevel(playerid, 0);
- return 1;
- }
- if(!strcmp(cmdtext, "/tirar-cinto", true))
- {
- CINTOSEG[playerid] = 0;
- SendClientMessage(playerid,Roxo,"[BML]: Cuidado, você está sem cinto, pode se machucar /usar-cinto");
- return 1;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement