for(new i = 0; i < MAX_PLAYERS; i ++)
{
if(InPaintball[i] != 0)
{
pRound = 0;
VotedMap[i] = 0;
VotedGun[i] = 0;
pVoted = 1;
ResetPlayerWeapons(i);
SetPlayerInterior(i, 10);
SetPlayerVirtualWorld(i, 0);
pGun[1] = 0, pGun[2] = 0, pGun[3] = 0, pGun[4] = 0, pGun[5] = 0, pGun[6] = 0;
new sendername[MAX_PLAYER_NAME], string[256];
GetPlayerName(pWinner, sendername, sizeof(sendername));
format(string, sizeof(string), "Castigatorul acestei runde de paintball este: %s - %d kills", GetName(pWinner), pWinnerScore);
SendClientMessage(i, COLOR_YELLOW, string);
SetTimer("StartPaintball", 30000, 0);
}
}
[19:41:24] Cea mai votata arma a fost: Deagle. (2 voturi)
[19:41:24] Cea mai votata arma a fost: Deagle. (2 voturi)
[19:41:25] Cea mai votata arma a fost: Deagle. (2 voturi)
[19:41:25] Cea mai votata arma a fost: Deagle. (2 voturi)
[19:41:25] Cea mai votata arma a fost: Deagle. (2 voturi)
[19:41:25] Cea mai votata arma a fost: Deagle. (2 voturi)
[19:41:27] Cea mai votata arma a fost: Deagle. (2 voturi)
[19:41:27] Cea mai votata arma a fost: Deagle. (2 voturi)
forward StopPaintball();
public StopPaintball()
{
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if(InPaintball[i] != 0)
{
pRound = 0;
VotedMap[i] = 0;
VotedGun[i] = 0;
pVoted = 1;
ResetPlayerWeapons(i);
SetPlayerInterior(i, 10);
SetPlayerVirtualWorld(i, 0);
pGun[1] = 0, pGun[2] = 0, pGun[3] = 0, pGun[4] = 0, pGun[5] = 0, pGun[6] = 0;
new sendername[MAX_PLAYER_NAME], string[256];
GetPlayerName(pWinner, sendername, sizeof(sendername));
format(string, sizeof(string), "Castigatorul acestei runde de paintball este: %s - %d kills", GetName(pWinner), pWinnerScore);
SendClientMessage(i, COLOR_YELLOW, string);
SetTimer("StartPaintball", 30000, 0);
}
}
return 1;
}
if(strcmp(cmd, "/paintball", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerToPoint(5.0, playerid, 1328.6179, -1557.9896, 13.8794))
{
pPlayers ++;
PlayerKills[playerid] = 0;
InPaintball[playerid] = 1;
pVoted = 1;
VotedMap[playerid] = 0;
VotedGun[playerid] = 0;
SetPlayerHealth(playerid, 100);
SetPlayerInterior(playerid, 10);
SetPlayerPos(playerid, -973.7964, 1077.2219, 1345.0875);
SendClientMessage(playerid, COLOR_WHITE, "Pentru a vota o mapa sau o arma foloseste comanda {0976B0}/vote.");
if(pRound == 0) { SetTimer("StartPaintball", 30000, 0); }
if(pRound == 1)
{
if(pGun[1] == 1) { GivePlayerWeapon(playerid, 24, 500); }
if(pGun[2] == 1) { GivePlayerWeapon(playerid, 25, 500); }
if(pGun[3] == 1) { GivePlayerWeapon(playerid, 31, 500); }
if(pGun[4] == 1) { GivePlayerWeapon(playerid, 27, 500); }
if(pGun[5] == 1) { GivePlayerWeapon(playerid, 4, 500); }
if(pGun[6] == 1) { GivePlayerWeapon(playerid, 5, 500); }
}
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if(InPaintball[i] != 0)
{
SetPlayerMarkerForPlayer(42, 1, 0xFF0000FF);
return 1;
}
}
}
}
return 1;
}
[19:41:24] Cea mai votata arma a fost: Deagle. (2 voturi) [19:41:24] Cea mai votata arma a fost: Deagle. (2 voturi) [19:41:25] Cea mai votata arma a fost: Deagle. (2 voturi) [19:41:25] Cea mai votata arma a fost: Deagle. (2 voturi) [19:41:25] Cea mai votata arma a fost: Deagle. (2 voturi) [19:41:25] Cea mai votata arma a fost: Deagle. (2 voturi) [19:41:27] Cea mai votata arma a fost: Deagle. (2 voturi) [19:41:27] Cea mai votata arma a fost: Deagle. (2 voturi)
Yeah but you showed us this:
Код:
[19:41:24] Cea mai votata arma a fost: Deagle. (2 voturi) [19:41:24] Cea mai votata arma a fost: Deagle. (2 voturi) [19:41:25] Cea mai votata arma a fost: Deagle. (2 voturi) [19:41:25] Cea mai votata arma a fost: Deagle. (2 voturi) [19:41:25] Cea mai votata arma a fost: Deagle. (2 voturi) [19:41:25] Cea mai votata arma a fost: Deagle. (2 voturi) [19:41:27] Cea mai votata arma a fost: Deagle. (2 voturi) [19:41:27] Cea mai votata arma a fost: Deagle. (2 voturi) |
foreach(Player, i)
{
if(InPaintball[i] != 0)
{
if(VoteGuns[1] == 0 && VoteGuns[2] == 0 && VoteGuns[3] == 0 && VoteGuns[4] == 0 && VoteGuns[5] == 0 && VoteGuns[6] == 0)
{
SendClientMessage(i, COLOR_WHITE, "Runda de paintball a fost amanata cu 30 de secunde deoarece nu s-a votat nici o arma.");
SetTimer("StartPaintball", 30000, 0);
return 1;
}
if(VoteGuns[1] > VoteGuns[2] && VoteGuns[1] > VoteGuns[3] && VoteGuns[1] > VoteGuns[4] && VoteGuns[1] > VoteGuns[5] && VoteGuns[1] > VoteGuns[6])
{
format(string, sizeof(string), "Cea mai votata arma a fost: Deagle. (%d voturi)", VoteGuns[1]);
GivePlayerWeapon(i, 24, 500);
pGun[1] = 1;
}
SendClientMessage(i, COLOR_WHITE, string);
SetTimer("StopPaintball", 180000, 0);
forward StopPaintball();
public StopPaintball()
{
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if(InPaintball[i] != 0)
{
pRound = 0;
VotedMap[i] = 0;
VotedGun[i] = 0;
pVoted = 1;
ResetPlayerWeapons(i);
SetPlayerInterior(i, 10);
SetPlayerVirtualWorld(i, 0);
pGun[1] = 0, pGun[2] = 0, pGun[3] = 0, pGun[4] = 0, pGun[5] = 0, pGun[6] = 0;
new sendername[MAX_PLAYER_NAME], string[256];
GetPlayerName(pWinner, sendername, sizeof(sendername));
format(string, sizeof(string), "Castigatorul acestei runde de paintball este: %s - %d kills", GetName(pWinner), pWinnerScore);
SendClientMessage(i, COLOR_YELLOW, string);
SetTimer("StartPaintball", 30000, 0);
break; // this breaks the loop from looping anymore..
}
}
return 1;
}
forward StopPaintball();
public StopPaintball()
{
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if(InPaintball[i] != 0)
{
pRound = 0;
PlayerKills[i] = -1;
VotedMap[i] = 0;
VotedGun[i] = 0;
pVoted = 1;
ResetPlayerWeapons(i);
SetPlayerInterior(i, 10);
SetPlayerVirtualWorld(i, 0);
pGun[1] = 0, pGun[2] = 0, pGun[3] = 0, pGun[4] = 0, pGun[5] = 0, pGun[6] = 0;
new sendername[MAX_PLAYER_NAME], string[256];
GetPlayerName(pWinner, sendername, sizeof(sendername));
format(string, sizeof(string), "Castigatorul acestei runde de paintball este: %s - %d kills", GetName(pWinner), pWinnerScore);
SendClientMessage(i, COLOR_YELLOW, string);
SetTimer("StartPaintball", 30000, 0);
break;
}
}
}