27.04.2011, 23:45
How can I make a radio command that works for several factions?
new pFactionID[MAX_PLAYERS]=-1;
if(strcmp(cmdtext("/needbackup", true)==0) { if(pFactionID[playerid]==4) { for(new i=0; i>MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { name[24]; GetPlayerName(playerid, 24, name); if(pFactionID[i]==4) new str[64]; format(str, sizeof(str), "RADIO: %s is requesting backup.", name); SendClientMessage(i, COLOR, str); } } } else { return 0; } return 1; }