21.11.2017, 04:05
faзa desse code sua base
PHP Code:
#include <foreach>
#include <zcmd>
new Usou1[MAX_PLAYERS], Usou2[MAX_PLAYERS], Usou3[MAX_PLAYERS];
public OnPlayerConnect(playerid){
Usou1[playerid] = 0;
Usou2[playerid] = 0;
Usou3[playerid] = 0;
return 1;
}
public OnPlayerDisconnect(playerid){
Usou1[playerid] = 0;
Usou2[playerid] = 0;
Usou3[playerid] = 0;
return 1;
}
CMD:radio(playerid){
foreach(Player, i){
if(OuvindoRadio[i] == true) Usou1[i] ++;
if(OuvindoRadio2[i] == true) Usou2[i] ++;
if(OuvindoRadio3[i] == true) Usou3[i] ++;
}
return 1;
}
CMD:ouvintes(playerid){
new string[40];
foreach(Player, i){
if(OuvindoRadio[i] == true){
format(string, sizeof(string), "%d Ouvintes Radio 1", Usou1[i]);
SendClientMessageToAll(cores, string);
}
if(OuvindoRadio2[i] == true){
format(string, sizeof(string), "%d Ouvintes Radio 2", Usou2[i]);
SendClientMessageToAll(cores, string);
}
if(OuvindoRadio3[i] == true){
format(string, sizeof(string), "%d Ouvintes Radio 3", Usou3[i]);
SendClientMessageToAll(cores, string);
}
}
return 1;
}