25.11.2016, 17:46
PHP код:
dcmd_totaltimes(playerid, params[])
{
#pragma unused params
new ptTotalTime1 = 0, ptTotalTime2 =0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i))
continue;
if(Player[i][pTime1] == 1)
ptTotalTime1 ++;
else if(Player[i][pTime2] == 1)
ptTotalTime2 ++;
}
new String[150];
format(String, sizeof(String), "{FFFFFF}Players Time 1:%d\n{FFFFFF}Players Time 2: %d", ptTotalTime1, ptTotalTime2);
ShowPlayerDialog(playerid, 96251, DIALOG_STYLE_MSGBOX, "Total Players dos Times", String, "Ok", "");
return 1;
}