Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. public OnPlayerCommandText(playerid, cmdtext[])
  2. {
  3. if (strcmp("/bite", cmdtext, true, 10) == 0)
  4. {
  5. new Float:Infected[3];
  6. GetPlayerPos(playerid, Infected[0], Infected[1], Infected[2]);
  7. for (new H = 0; H < MAX_PLAYERS; H++)
  8. {
  9. if (H == playerid)
  10. {
  11. H = H + 1;
  12. } else {
  13. if (IsPlayerConnected(H))
  14. {
  15. if (IsPlayerInRangeOfPoint(H, 5.0, Infected[0], Infected[1], Infected[2]))
  16. {
  17. if (GetPlayerTeam(H) != 1)
  18. {
  19. SetPlayerHealth(H, 0);
  20. GameTextForPlayer(H, "You've been bitten.",10000,1);
  21. }
  22. } else {
  23. GameTextForPlayer(playerid,"There is anyone close enough to bite.",100,1);
  24. }
  25. } else {
  26. GameTextForPlayer(playerid,"There is anyone close enough to bite.",100,1);
  27. }
  28. }
  29.  
  30. }
  31. }
  32.  
  33. return 1;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement