Command /Find
#1

Hello every one i am making Zombie Server and i wanna make Class for zombie that Can /find and Teleport to the Closest Player i got everything but ,Zombie won't Teleport to the Human
Here is the Code
pawn Код:
COMMAND:find(playerid, params[])
        {
        new targetid,Float:x,Float:y,Float:z;
        if(gTeam[playerid] == TEAM_ZOMBIES && ZombieClass[playerid] == Rotting)
        {
      for(new i = 0; i < MAX_PLAYERS; i++)
            if(!IsPlayerConnected(i) && gTeam[i] == TEAM_ZOMBIES)
                {
                return SendClientMessage(playerid,COLOR_RED,"No humans Online");
                }
        if(gTeam[targetid] == TEAM_HUMANS)
        {
        targetid = GetClosestPlayer(playerid);
        GetPlayerPos(targetid,x,y,z);
        SetPlayerPos(playerid,x,y,z);
        }
        }
        else return SendClientMessage(playerid,COLOR_RED,"You are Not Rotting/Zombie");
        return 1;
        }
Reply


Messages In This Thread
Command /Find - by [D]ry[D]esert - 18.05.2012, 15:15
Re: Command /Find - by Mark™ - 18.05.2012, 15:19
Re: Command /Find - by [D]ry[D]esert - 18.05.2012, 15:31
Re: Command /Find - by Mark™ - 18.05.2012, 15:34
Re: Command /Find - by [D]ry[D]esert - 18.05.2012, 15:45
Re: Command /Find - by Mark™ - 18.05.2012, 16:05
Re: Command /Find - by ProjectGANTON - 18.05.2012, 16:44

Forum Jump:


Users browsing this thread: 1 Guest(s)