30.11.2012, 01:20
estava estudando um gm para aprender a codar e achei uma linha de evento paint ball
alguem sabe pra que serve ? como liga ? n achei nenhum comando
Код:
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;
}

