Command /Find
#7

PHP код:
COMMAND:find(playeridparams[])
        {
        new 
targetid,Float:x,Float:y,Float:zstring[60];
        if(
gTeam[playerid] == TEAM_ZOMBIES && ZombieClass[playerid] == Rotting)
        {
        for(new 
0MAX_PLAYERSi++)
        {
        if(!
IsPlayerConnected(i) || gTeam[i] == TEAM_ZOMBIES) return SendClientMessage(playerid,"No humans online");
        }
        
targetid GetClosestPlayer(playerid);
        
GetPlayerPos(targetid,x,y,z);
        
SetPlayerPos(playerid,x,y,z);
        
format(string,sizeof(string),"Teleported to %s",GetPlayerName(targetid));
        
SendClientMessage(playerid,COLOR_RED,string);
        return 
1;
        }
        if(
gTeam[playerid] == TEAM_HUMANS)
        {
        for(new 
0MAX_PLAYERSi++)
        {
        if(!
IsPlayerConnected(i) || gTeam[i] == TEAM_HUMANS) return SendClientMessage(playerid,"No zombies online");
        }
        
targetid GetClosestPlayer(playerid);
        
GetPlayerPos(targetid,x,y,z);
        
SetPlayerPos(playerid,x,y,z);
        
format(string,sizeof(string),"Teleported to %s",GetPlayerName(targetid));
        
SendCLientMessage(playerid,COLOR_RED,string);
        }
        } 
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: 2 Guest(s)