Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/bite", cmdtext, true, 10) == 0)
- {
- new Float:Infected[3];
- GetPlayerPos(playerid, Infected[0], Infected[1], Infected[2]);
- for (new H = 0; H < MAX_PLAYERS; H++)
- {
- if (H == playerid)
- {
- H = H + 1;
- } else {
- if (IsPlayerConnected(H))
- {
- if (IsPlayerInRangeOfPoint(H, 5.0, Infected[0], Infected[1], Infected[2]))
- {
- if (GetPlayerTeam(H) != 1)
- {
- SetPlayerHealth(H, 0);
- GameTextForPlayer(H, "You've been bitten.",10000,1);
- }
- } else {
- GameTextForPlayer(playerid,"There is anyone close enough to bite.",100,1);
- }
- } else {
- GameTextForPlayer(playerid,"There is anyone close enough to bite.",100,1);
- }
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement