Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include a_samp
- #define tempo (150)
- forward cHeadShot();
- public OnGameModeInit()
- return SetTimer("cHeadShot", tempo, true);
- public OnPlayerDeath(playerid, killerid, reason)
- {
- if(GetPVarInt(playerid, "HS") == 1)
- {
- SetPVarInt(playerid, "HS", 0);
- GameTextForPlayer(killerid, "~g~Boa, fez um HeadShot!", 2500, 3);
- GameTextForPlayer(playerid, "~r~Sofreu um HeadShot!", 2500, 3);
- }
- return true;
- }
- public cHeadShot()
- {
- static
- x,
- y,
- z;
- x = playerid;
- y = GetMaxPlayers();
- z = GetPlayerAnimationIndex(playerid);
- for( ; x != y; x++)
- {
- if(IsPlayerConnected(x))
- {
- if(z == 1173 || z == 1175 || z == 1177 || z == 1178)
- {
- SetPVarInt(playerid, "HS", 1);
- setPlayerHealth(playerid, 0);
- }
- }
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment