[pomoc] /radio

Započeo | MARKO |, Oktobar 24, 2010, 11:45:39 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

komandu /radio mogu koristit na policiji, fbi, swat, al ne mogu na bolnici. sad me zanima kako mogu napraviti da i bolnica moze koristiti tu cmd.

if(strcmp(cmd, "/radio", true) == 0 || strcmp(cmd, "/r", true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "KORISTI: (/r)adio [radio chat]");
return 1;
}
   else if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** PD.Direktor %s: %s, over. **", sendername, result); }
   else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** PD.Zamjenik %s: %s, over. **", sendername, result); }
   else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** PD.Zapovjednik %s: %s, over. **", sendername, result); }
   else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** PD.Visi Policajac %s: %s, over. **", sendername, result); }
   else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** PD.Policajac %s: %s, over. **", sendername, result); }
   else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** PD.Ucenik %s: %s, over. **", sendername, result); }
   else
{
format(string, sizeof(string), "** PD.Ucenik %s: %s, over. **", sendername, result);
}
SendRadioMessage(3, TEAM_BLUE_COLOR, string);
printf("%s", string);
return 1;
}
   else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
{
if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** FBI.Direktor %s: %s, over. **", sendername, result); }
   else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** FBI.Zamjenik %s: %s, over. **", sendername, result); }
   else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** FBI.Presretac %s: %s, over. **", sendername, result); }
   else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** FBI.Visi Agent %s: %s, over. **", sendername, result); }
   else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** FBI.Agent %s: %s, over. **", sendername, result); }
   else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** FBI.Ucenik %s: %s, over. **", sendername, result); }
   else
{
format(string, sizeof(string), "** FBI.Ucenik %s: %s, over. **", sendername, result);
}
SendRadioMessage(3, TEAM_BLUE_COLOR, string);
printf("%s", string);
return 1;
}
   else if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
{
if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** SWAT.Direktor %s: %s, over. **", sendername, result); }
   else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** SWAT.Zamjenik %s: %s, over. **", sendername, result); }
   else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** SWAT.Zapovjednik %s: %s, over. **", sendername, result); }
   else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** SWAT.Operator %s: %s, over. **", sendername, result); }
   else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** SWAT.Tactic Specialist %s: %s, over. **", sendername, result); }
   else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** SWAT.Agent %s: %s, over. **", sendername, result); }
   else
{
format(string, sizeof(string), "** SWAT.Agent %s: %s, over. **", sendername, result);
}
SendRadioMessage(3, TEAM_BLUE_COLOR, string);
printf("%s", string);
return 1;
}
   else if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)
{
if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** MD.Direktor %s: %s, over. **", sendername, result); }
   else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** MD.Zamjenik %s: %s, over. **", sendername, result); }
   else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** MD.Visi Kirurg %s: %s, over. **", sendername, result); }
   else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** MD.Kirurg %s: %s, over. **", sendername, result); }
   else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** MD.Doktor %s: %s, over. **", sendername, result); }
   else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** MD.Brat %s: %s, over. **", sendername, result); }
   else
{
format(string, sizeof(string), "** MD.Brat %s: %s, over. **", sendername, result);
}
SendRadioMessage(3, TEAM_BLUE_COLOR, string);
printf("%s", string);
return 1;
}
  else if(PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7)
{
   if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Gradonacelnik %s: %s, over. **", sendername, result); }
   else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Tjelesni Cuvar %s: %s, over. **", sendername, result); }
   else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Tjelesni Cuvar %s: %s, over. **", sendername, result); }
   else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Vozac %s: %s, over. **", sendername, result); }
   else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Vozac %s: %s, over. **", sendername, result); }
   else
{
format(string, sizeof(string), "** MD.Brat %s: %s, over. **", sendername, result);
}
SendRadioMessage(3, TEAM_BLUE_COLOR, string);
printf("%s", string);
return 1;
}
   else if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9)
{
if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Direktor %s: %s, over. **", sendername, result); }
   else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Menadzer %s: %s, over. **", sendername, result); }
   else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Tajnik %s: %s, over. **", sendername, result); }
   else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Urednik %s: %s, over. **", sendername, result); }
   else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Novinar %s: %s, over. **", sendername, result); }
   else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Pocetnik %s: %s, over. **", sendername, result); }
   else
{
format(string, sizeof(string), "** Pocetnik %s: %s, over. **", sendername, result);
}
SendRadioMessage(3, TEAM_BLUE_COLOR, string);
printf("%s", string);
return 1;
}
   else if(PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)
{
if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Vlasnik Taxi Kompanije %s: %s, over. **", sendername, result); }
   else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Nadzornik %s: %s, over. **", sendername, result); }
   else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Dispacer %s: %s, over. **", sendername, result); }
   else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Vozac %s: %s, over. **", sendername, result); }
   else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Vozac Pocetnik %s: %s, over. **", sendername, result); }
   else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Ucenik %s: %s, over. **", sendername, result); }
   else
{
format(string, sizeof(string), "** Ucenik %s: %s, over. **", sendername, result);
}
SendRadioMessage(3, TEAM_BLUE_COLOR, string);
printf("%s", string);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "   Niste clan organizacije !");
return 1;
}
}
return 1;
}


pokusao sam i sa /setteam. pa sam stavio na broj 2. i opet nista

EDIT: Rjesio sam. sry na otvaranju teme.
Poslednja Izmena: Oktobar 24, 2010, 12:53:17 POSLE PODNE od Moonwalker