How to SetPlayerPos for all the players?
#7

Quote:
Originally Posted by [MG]Dimi
Посмотреть сообщение
PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    if (!
strcmp("/bringall"cmdtexttrue))
    {
        new 
Float:Pos[3],pName[24],string[128];
        
GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
        
GetPlayerName(playerid,pName,sizeof(pName));
        
format(string,128,"%s(%d) has brought everyone to his position!",pName,playerid);
        
SendClientMessageToAll(0xFF0000FF,string);
        for(new 
i=0;i<MAX_PLAYERS;i++)
        if(
IsPlayerConnected(playerid))
        {
            
SetPlayerPos(i,Pos[0],Pos[1],Pos[2]);
            return 
1;
        }
        return 
1;
    }
    return 
0;

It compiled. I'm about to test it. Can you give me a link where I can learn that? Thank you.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)