Need Some Help With My /Bite Command
#1

Hey, I have a /bite command already but I want to redo it.

I just want someone to post a script that will bite nearby players within a 4 metre distance ingame.
I need it to only be for certain players though. (Zombies) and I want it to effect all human players in this way:
Код:
		SetPlayerColor(playerid,ZRED);
		SetPlayerTeam(playerid, 2);
		SetPlayerHealth(playerid, 50);
		GivePlayerWeapon(playerid,9,5000);
		GameTextForPlayer(playerid,"~r~Zombie: ~b~/hide",10000,1);
Humans (Teams):
Код:
(team[playerid] == 10)
(team[playerid] == 11)
(team[playerid] == 1)
(team[playerid] == 4)
(team[playerid] == 5)
Zombies (Teams):
Код:
(team[playerid] == 2)
Thanks. So in short: I want a /bite command that the Zombie team can only use. Human Team Members within a 4 metre distance will have this happen to them:
Код:
		SetPlayerColor(playerid,ZRED);
		SetPlayerTeam(playerid, 2);
		SetPlayerHealth(playerid, 50);
		GivePlayerWeapon(playerid,9,5000);
		GameTextForPlayer(playerid,"~r~Zombie: ~b~/hide",10000,1);
Reply
#2

Bump.. Someone........
Reply
#3

Quote:
Originally Posted by iRape
Bump.. Someone........
Bump lol, this is a failure.
Reply
#4

Quote:
Originally Posted by iRape
Quote:
Originally Posted by iRape
Bump.. Someone........
Bump lol, this is a failure.
Bump.. AND IIII JUST WANT A CHANNNNNCE.. TO SHINEEEEEEEE
Reply
#5

pawn Код:
if(strcmp(cmdtext, "/bite", true) == 0)
{
    if(team[playerid] == 2)
    {
        new Float:zombiepos[3];
        GetPlayerPos(playerid, zombiepos[0], zombiepos[1], zombiepos[2]);
        for(new i=0; i<MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                if(IsPlayerInRangeOfPoint(i, 4.0, zombiepos[0], zombiepos[1], zombiepos[2]))
                {
                    switch(team[i])
                    {
                        case 10, 11, 1, 4, 5:
                        {
                            SetPlayerColor(i,ZRED);
                            SetPlayerTeam(i, 2);
                            SetPlayerHealth(i, 50);
                            GivePlayerWeapon(i,9,5000);
                            GameTextForPlayer(i,"~r~Zombie: ~b~/hide",10000,1);
                        }
                    }
                }
            }
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)