[Ajuda] Codigo desconhecido do gm
#1

estava estudando um gm para aprender a codar e achei uma linha de evento paint ball
Код:
new StartingPaintballRornd = 0;
new AnnorncedPaintballRornd = 0;
new PaintballPlayers = 0;
new PaintballRornd = 0;
new PaintballWinner = 999;
new PaintballWinnerKills = 0;
Код:
public PreparePaintball()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
	{
	    if(IsPlayerConnected(i))
	    {
	        if(PlayerPaintballing[i] != 0)
	        {
	            SetPlayerVirtualWorld(i,0);
	            SetPlayerInterior(i,10);
	            SendClientMessage(i, COLOR_YELLOW, "O Paintball vai comeзar em 20 segundos.");
	        }
		}
	}
 	SetTimer("StartPaintball", 20000, 0);
	return 1;
}

public StartPaintball()
{
	PaintballRornd = 1;
	StartingPaintballRornd = 0;
	PaintballWinner = 999;
	PaintballWinnerKills = 0;
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
	    if(IsPlayerConnected(i))
	    {
	        if(PlayerPaintballing[i] != 0)
	        {
	            ResetPlayerWeaponsEx(i);
	            GivePlayerWeapon(i, 29, 999);
	            GivePlayerWeapon(i, 25, 999);
	            GivePlayerWeapon(i, 31, 999);
	            SetPlayerArmour(i, 100.0);
	            SetPlayerHealth(i, 100.0);
	            SetPlayerInterior(i,10);
	            TogglePlayerControllable(i, 1);
	            SendClientMessage(i, COLOR_YELLOW, "O Paintball comeзou, 5 minutos para acabar.");
	            PlayerPlaySound(i, 1057, 0.0, 0.0, 0.0);
	        }
	    }
	}
	SetTimer("PaintballEnded", 300000, 0);
	return 1;
}

public SendVIPMessage(color, string[])
{
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
		    if(PlayerInfo[i][pVIP] >= 1)
		    {
				SendClientMessage(i, color, string);
			}
		}
	}
}


public PaintballEnded()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
	{
	    if(IsPlayerConnected(i))
	    {
	        if(PlayerPaintballing[i] != 0)
	        {
	            if(IsPlayerConnected(PaintballWinner))
	            {
	                format(gstring,sizeof(gstring), "** %s ganhou o PaintBall, Matou: %d",PlayerName(PaintballWinner),PaintballWinnerKills);
	                SendClientMessage(i, COLOR_LIGHTBLUE, gstring);
                    PaintballRornd = 0;
	            }
	            ResetPlayerWeaponsEx(i);
	            SetPlayerInterior(i,0);
	            PlayerPaintballing[i] = 0;
	            SetPlayerPos(i, SBizzInfo[10][sbEntranceX],SBizzInfo[10][sbEntranceY],SBizzInfo[10][sbEntranceZ]);
	        }
		}
	}
	AnnorncedPaintballRornd = 0;
    PaintballRornd = 0;
	return 1;
}
alguem sabe pra que serve ? como liga ? n achei nenhum comando
Reply
#2

"O Paintball vai comeзar em 20 segundos." < tem algum settimer.

PreparePaintball procura por isto em alguma parte qe tem aver com tempo..
Reply
#3

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
if(
strcmp(cmdtext"/ComecarPaintball"true) == 0)
    {
    
PreparePaintball();
    return 
1;
}
    return 
0;
}
    
public 
PreparePaintball()
{
    for(new 
0MAX_PLAYERSi++)
    {
        if(
IsPlayerConnected(i))
        {
            if(
PlayerPaintballing[i] != 0)
            {
                
SetPlayerVirtualWorld(i,0);
                
SetPlayerInterior(i,10);
                
SendClientMessage(iCOLOR_YELLOW"O Paintball vai comeзar em 20 segundos.");
            }
        }
    }
     
SetTimer("StartPaintball"200000);
    return 
1;
}
public 
StartPaintball()
{
    
PaintballRornd 1;
    
StartingPaintballRornd 0;
    
PaintballWinner 999;
    
PaintballWinnerKills 0;
    for(new 
0MAX_PLAYERSi++)
    {
        if(
IsPlayerConnected(i))
        {
            if(
PlayerPaintballing[i] != 0)
            {
                
ResetPlayerWeaponsEx(i);
                
GivePlayerWeapon(i29999);
                
GivePlayerWeapon(i25999);
                
GivePlayerWeapon(i31999);
                
SetPlayerArmour(i100.0);
                
SetPlayerHealth(i100.0);
                
SetPlayerInterior(i,10);
                
TogglePlayerControllable(i1);
                
SendClientMessage(iCOLOR_YELLOW"O Paintball comeзou, 5 minutos para acabar.");
                
PlayerPlaySound(i10570.00.00.0);
            }
        }
    }
    
SetTimer("PaintballEnded"3000000);
    return 
1;
}
public 
SendVIPMessage(colorstring[])
{
    for(new 
0MAX_PLAYERSi++)
    {
        if(
IsPlayerConnected(i))
        {
            if(
PlayerInfo[i][pVIP] >= 1)
            {
                
SendClientMessage(icolorstring);
            }
        }
    }
}
public 
PaintballEnded()
{
    for(new 
0MAX_PLAYERSi++)
    {
        if(
IsPlayerConnected(i))
        {
            if(
PlayerPaintballing[i] != 0)
            {
                if(
IsPlayerConnected(PaintballWinner))
                {
                    
format(gstring,sizeof(gstring), "** %s ganhou o PaintBall, Matou: %d",PlayerName(PaintballWinner),PaintballWinnerKills);
                    
SendClientMessage(iCOLOR_LIGHTBLUEgstring);
                    
PaintballRornd 0;
                }
                
ResetPlayerWeaponsEx(i);
                
SetPlayerInterior(i,0);
                
PlayerPaintballing[i] = 0;
                
SetPlayerPos(iSBizzInfo[10][sbEntranceX],SBizzInfo[10][sbEntranceY],SBizzInfo[10][sbEntranceZ]);
            }
        }
    }
    
AnnorncedPaintballRornd 0;
    
PaintballRornd 0;
    return 
1;

Reply
#4

Nome das publicґs diz tudo .

SendVIPMessage - Mensage dos vipґs
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)