27.10.2016, 14:23
So, if I understood the thread, you want people in the same alliance to be on the same "frequency"? For that, you could do something like this:
PHP код:
new Group_Name [ MAX_PLAYERS ] [ MAX_PLAYER_NAME ] ;
new Alliance_ID [ MAX_PLAYERS char ] ;
SharedFrequency ( playerid, text [ ] ) {
new string [ 256 ] ;
// Loop through players
foreach (new i: Player) {
// If the alliance ID matches that with another player...
if ( Alliance_ID { playerid } == Alliance_ID { i } ) {
// Format the text to be sent to them showing the group name and text
format ( string, sizeof ( string ), "[%s]: %s ", Group_Name [ playerid ], text);
SendClientMessage ( i, -1, string ) ; // And send it
}
}
return true ;
}