Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ocmd:f(playerid,params[])
- {
- new fraction = GetPVarInt(playerid,"Fraktion");
- if(getFractionType(fraction) == 2)
- {
- if(sscanf(params,"s",text)) return SendClientMessage(playerid,COLOR_GRAU,"/f [text]");
- new text[128];
- format(text,sizeof(text),"Fraktionsmember %s: %s",SpielerName(playerid),text);
- sendFractionMessage(frak,text);
- }
- return 1;
- }
- forward getFractionType(fraction);
- public getFractionType(fraction)
- {
- // return 1 für Staat
- // return 2 für Mafia
- if(fraction == 1) return 1;
- if(fraction == 2) return 1;
- if(fraction == 3) return 2;
- if(fraction == 4) return 2;
- if(fraction == 5) return 2;
- if(fraction == 6) return 2;
- if(fraction == 7) return 2;
- if(fraction == 8) return 2;
- if(fraction == 9) return 2;
- if(fraction == 10) return 2;
- if(fraction == 11) return 1;
- if(fraction == 12) return 2;
- return 0;
- }
- forward sendFractionMessage(fraction,text[]);
- public sendFractionMessage(fraction,text[])
- {
- for(new i=0; i<GetMaxPlayers(); i++)
- {
- if(IsPlayerConnected(i))
- {
- if(isPlayerInFrakt(i,fraction))
- {
- SendClientMessage(i, COLOR_GANGFARBE, text);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement