25.09.2018, 04:31
I really need it. I need to make him only choose the president and the vice president only once. In the countdown, he chooses the president and the vice president at every moment.
CODE:
I need to have him only choose the president and the vice president once, and only show the countdown and not the message again. Any idea how to do that?
CODE:
PHP код:
P_INFO[TIME_START] --;
if(P_INFO[TIME_START] >= 1)
{
for(new playerid = 0, j = GetPlayerPoolSize(); playerid <= j; playerid++)
{
if(IsPlayerConnected(playerid))
{
if(Player[playerid][M_PTP] == 1)
{
new str[10]; format(str, sizeof(str), "%d", P_INFO[TIME_START]);
GameTextForPlayer(playerid, str, 1000, 3);
new r = Iter_Random(PlayersInEvent);
if(!P_INFO[PRESIDENT_READY])
{
Iter_Remove(PlayersInEvent, r);
P_INFO[PRESIDENT_READY] = true;
Player[r][PLAYER_SERVICE_SECRET] = PRESIDENT;
SendClientMessageEx(playerid, -1, "%s is the new president", Player[r][NAME]);
}
else
{
Player[r][PLAYER_SERVICE_SECRET] = VICE_PRESIDENT;
SendClientMessageEx(playerid, -1, "%s is the new vice president", Player[r][NAME]);
}
}
}
}
}