[POMOC] /F chatovi

Započeo [ED] Marac, Septembar 18, 2011, 14:08:51 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Skripta koju koristim: Red Line
Detaljan opis problema: Pa PD/FBI/SWAT nemaju /F chat tj. neradi im isao sam pod /F /faction ili /Family u modu i tamo sam nasao i bilo je napisano za pd rankove fbi i swat mozete li mi pomoc ?
Dio skripte: Ako zatreba dat cu
Neke slike/video za lakse dobivanje pomoci(neobavezno): -

Daj cjelu komandu /f
Mada ti za PD/FBI/SWAT netrebaju /f jer  oni nisu family nego oni su ORG. i oni koriste /r ili ti ga /radio :) 
Poslednja Izmena: Septembar 18, 2011, 14:16:39 POSLE PODNE od [EM] FyoDoR

Citat: [EM] FyoDoR poslato Septembar 18, 2011, 14:14:38 POSLE PODNE
Daj cjelu komandu /f
Mada ti za PD/FBI/SWAT netrebaju /f jer  oni nisu family nego oni su ORG. i oni koriste /r ili ti ga /radio :) 
/r ti je IC chat i trebale bi ga imati sve organizacije kao i /f posto je /f OOC chat...
Barem tako je kod onih ROLEPLAY servera

 if(strcmp(cmd, "/family", true) == 0 || strcmp(cmd, "/f", true) == 0 || strcmp(cmd, "/faction", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "Ne mozete pricati, oduzeto vam je pravo govora");
return 1;
}
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, "Koriscenje: (/f)action [chat organizacije]");
return 1;
}
if (PlayerInfo[playerid][pLeader] > 0 || PlayerInfo[playerid][pMember] > 0 || PlayerInfo[playerid][pFMember] < 255)
{
    new leader = PlayerInfo[playerid][pLeader];
    new member = PlayerInfo[playerid][pMember];
    if(member==55)//1
    {
        if(PlayerInfo[playerid][pRank] == 8) { format(string, sizeof(string), "** (( Chief %s: %s )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 7) { format(string, sizeof(string), "** (( Deputy Chief %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** (( Captain %s: %s )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** (( Lieutenant %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** (( Sergeant %s: %s )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** (( Corporal %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** (( Police Officer %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** (( Cadet %s: %s ))  **", sendername, result); }
else { format(string, sizeof(string), "** (( Cadet %s: %s )) **", sendername, result); }
SendFamilyMessage(PlayerInfo[playerid][pMember], 0x7BDDA5AA, string);
    }
    if(member==55)//2
    {
        if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** (( Director %s: %s )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** (( Assistant Director in Charge %s: %s )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** (( Special Agent in Charge %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** (( Special Agent %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** (( Special Agent Trainee %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** (( Professional Staff %s: %s ))  **", sendername, result); }
else { format(string, sizeof(string), "** (( Professional Staff %s: %s )) **", sendername, result); }
SendFamilyMessage(PlayerInfo[playerid][pMember], 0x7BDDA5AA, string);
    }
    if(member==55)//3
    {
        if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** (( General %s: %s )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** (( Gen.Major %s: %s )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** (( Major %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** (( Kapetan %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** (( Vodnik %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** (( Vojnik %s: %s ))  **", sendername, result); }
else { format(string, sizeof(string), "** (( Private %s: %s )) **", sendername, result); }
SendFamilyMessage(PlayerInfo[playerid][pMember], 0x7BDDA5AA, string);
    }
    if(member==55)//4
    {
format(string, sizeof(string), "** (( Paramedic %s: %s )) **", sendername, result);
SendFamilyMessage(PlayerInfo[playerid][pMember], 0x7BDDA5AA, string);
    }
    if(member==5)
    {
        if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** (( Jefe %s: %s )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** (( Vato del jefe %s: %s )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** (( Soldado %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** (( Buscavidas %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** (( Cholo %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** (( Guero %s: %s ))  **", sendername, result); }
else { format(string, sizeof(string), "** (( Guero %s: %s )) **", sendername, result); }
SendFamilyMessage(PlayerInfo[playerid][pMember], 0x7BDDA5AA, string);
    }
    if(member==6)
    {
        if(PlayerInfo[playerid][pRank] == 8) { format(string, sizeof(string), "** (( Capo Crimini %s: %s )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 7) { format(string, sizeof(string), "** (( Capo Bastone %s: %s )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** (( Consiglieri %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** (( Capo Regime %s: %s )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** (( Sgarrista %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** (( Piciotto %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** (( Giovane D'honore %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** (( Outsider %s: %s ))  **", sendername, result); }
else { format(string, sizeof(string), "** (( Outsider %s: %s )) **", sendername, result); }
SendFamilyMessage(PlayerInfo[playerid][pMember], 0x7BDDA5AA, string);
}
else if(member==55)//7
{
    if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** (( Bodyguard %s: %s )) **", sendername, result); }
    if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** (( Driver %s: %s )) **", sendername, result); }
    else { format(string, sizeof(string), "** (( Not-assigned %s: %s )) **", sendername, result); }
    SendFamilyMessage(PlayerInfo[playerid][pMember], 0x7BDDA5AA, string);
}
else if(member==55)//8
{
    if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** (( Director %s: %s )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** (( Vice-Director %s: %s )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** (( Special Agent %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** (( Agent %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** (( Marksman %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** (( Freelancer %s: %s ))  **", sendername, result); }
else { format(string, sizeof(string), "** (( Freelancer %s: %s )) **", sendername, result); }
SendFamilyMessage(PlayerInfo[playerid][pMember], 0x7BDDA5AA, string);
}
else if(member==55)//9
{
    if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** (( Network Producer %s: %s )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** (( Network Editor %s: %s )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** (( Network Anchor %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** (( Local Editor %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** (( Local Reporter %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** (( Intern %s: %s ))  **", sendername, result); }
else { format(string, sizeof(string), "** (( Intern %s: %s )) **", sendername, result); }
SendFamilyMessage(PlayerInfo[playerid][pMember], 0x7BDDA5AA, string);
}
else if(member==55)//10
{
    if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** (( Taxi Company Owner %s: %s )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** (( Shift Supervisor %s: %s )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** (( Dispatcher %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** (( Cabbie %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** (( Taxi Rookie %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** (( Trainee %s: %s ))  **", sendername, result); }
else { format(string, sizeof(string), "** (( Trainee %s: %s )) **", sendername, result); }
SendFamilyMessage(PlayerInfo[playerid][pMember], 0x7BDDA5AA, string);
}
else if(member==55)//11
{
    if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** (( Boss %s: %s )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** (( Under Boss %s: %s )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** (( Manager %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** (( Senior Instructor %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** (( Instructor %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** (( Trainee %s: %s ))  **", sendername, result); }
else { format(string, sizeof(string), "** (( Trainee %s: %s )) **", sendername, result); }
SendFamilyMessage(PlayerInfo[playerid][pMember], 0x7BDDA5AA, string);
}
else if(member==12)
{
    if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** (( Boss %s: %s )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** (( Under Boss %s: %s )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** (( Manager %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** (( Senior Instructor %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** (( Instructor %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** (( Trainee %s: %s ))  **", sendername, result); }
else { format(string, sizeof(string), "** (( Trainee %s: %s )) **", sendername, result); }
SendFamilyMessage(PlayerInfo[playerid][pMember], 0x7BDDA5AA, string);
}
else if(member==14)
{
    if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** (( Don %s: %s )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** (( Don's right hand %s: %s )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** (( Capo %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** (( Shatei %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** (( Wakashu %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** (( Gaij in %s: %s ))  **", sendername, result); }
else { format(string, sizeof(string), "** (( Gaij in %s: %s )) **", sendername, result); }
SendFamilyMessage(PlayerInfo[playerid][pMember], 0x7BDDA5AA, string);
}
else if(member==15)
    {
        if(PlayerInfo[playerid][pRank] == 7) { format(string, sizeof(string), "** (( Top O.G %s: %s )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** (( Senior O.G %s: %s )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** (( O.G %s: %s )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** (( Soulja %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** (( Thug %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** (( Gangsta %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** (( Outsider %s: %s ))  **", sendername, result); }
else { format(string, sizeof(string), "** (( Outsider %s: %s )) **", sendername, result); }
SendFamilyMessage(PlayerInfo[playerid][pMember], 0x7BDDA5AA, string);
}
else if(member==16)
{
    if(PlayerInfo[playerid][pRank] == 9) { format(string, sizeof(string), "** (( Kingpin %s: %s )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 8) { format(string, sizeof(string), "** (( Double O.G %s: %s )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 7) { format(string, sizeof(string), "** (( O.G %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** (( Thug %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** (( Blood Pusher %s: %s )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** (( Blood Runner %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** (( Soulja %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** (( Outsider %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** (( Dumb Hoe %s: %s ))  **", sendername, result); }
else { format(string, sizeof(string), "** (( Dumb Hoe %s: %s )) **", sendername, result); }
SendFamilyMessage(PlayerInfo[playerid][pMember], 0x7BDDA5AA, string);
}
else if(leader==55)
{
    format(string, sizeof(string), "** (( Chief %s: %s )) **", sendername, result);
SendFamilyMessage(PlayerInfo[playerid][pLeader], 0x7BDDA5AA, string);
}
else if(leader==55)
{
    format(string, sizeof(string), "** (( Director %s: %s )) **", sendername, result);
SendFamilyMessage(PlayerInfo[playerid][pLeader], 0x7BDDA5AA, string);
}
else if(leader==55)
{
    format(string, sizeof(string), "** (( General %s: %s )) **", sendername, result);
SendFamilyMessage(PlayerInfo[playerid][pLeader], 0x7BDDA5AA, string);
}
else if(leader==55)
{
    format(string, sizeof(string), "** (( Paramedic %s: %s )) **", sendername, result);
SendFamilyMessage(PlayerInfo[playerid][pLeader], 0x7BDDA5AA, string);
}
else if(leader==5)
{
    format(string, sizeof(string), "** (( Jefe %s: %s )) **", sendername, result);
SendFamilyMessage(PlayerInfo[playerid][pLeader], 0x7BDDA5AA, string);
}
else if(leader==6)
{
    format(string, sizeof(string), "** (( Godfather %s: %s )) **", sendername, result);
SendFamilyMessage(PlayerInfo[playerid][pLeader], 0x7BDDA5AA, string);
}
else if(leader==755)
{
    format(string, sizeof(string), "** (( Mayor %s: %s )) **", sendername, result);
SendFamilyMessage(PlayerInfo[playerid][pLeader], 0x7BDDA5AA, string);
}
else if(leader==55)
{
    format(string, sizeof(string), "** (( Director %s: %s )) **", sendername, result);
SendFamilyMessage(PlayerInfo[playerid][pLeader], 0x7BDDA5AA, string);
}
else if(leader==55)
{
    format(string, sizeof(string), "** (( Network Producer %s: %s )) **", sendername, result);
SendFamilyMessage(PlayerInfo[playerid][pLeader], 0x7BDDA5AA, string);
}
else if(leader==55)
{
    format(string, sizeof(string), "** (( Taxi Company Owner %s: %s )) **", sendername, result);
SendFamilyMessage(PlayerInfo[playerid][pLeader], 0x7BDDA5AA, string);
}
else if(leader==11)
{
    format(string, sizeof(string), "** (( Boss %s: %s )) **", sendername, result);
SendFamilyMessage(PlayerInfo[playerid][pLeader], 0x7BDDA5AA, string);
}
else if(leader==12)
{
    format(string, sizeof(string), "** (( Boss %s: %s )) **", sendername, result);
SendFamilyMessage(PlayerInfo[playerid][pLeader], 0x7BDDA5AA, string);
}
else if(leader==14)
{
    format(string, sizeof(string), "** (( Don %s: %s )) **", sendername, result);
SendFamilyMessage(PlayerInfo[playerid][pLeader], 0x7BDDA5AA, string);
}
else if(leader==15)
{
    format(string, sizeof(string), "** (( Top O.G %s: %s )) **", sendername, result);
SendFamilyMessage(PlayerInfo[playerid][pLeader], 0x7BDDA5AA, string);
}
else if(leader==16)
{
    format(string, sizeof(string), "** (( Kingpin %s: %s )) **", sendername, result);
SendFamilyMessage(PlayerInfo[playerid][pLeader], 0x7BDDA5AA, string);
}
else if(PlayerInfo[playerid][pFMember] < 255)
    {
        if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** (( Godfather %s: %s )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** (( Underboss %s: %s )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** (( Capo %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** (( Soldier %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** (( Associate %s: %s ))  **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** (( Outsider %s: %s ))  **", sendername, result); }
else { format(string, sizeof(string), "** (( Outsider %s: %s )) **", sendername, result); }
SendNewFamilyMessage(PlayerInfo[playerid][pFMember], 0x7BDDA5AA, string);
}
printf("%s", string);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "   you are not part of a Family!");
return 1;
}
}//not connected
return 1;
}

Vidis te djelove u kojim su rankovi ?
Iznad svakog djela postoji jedan  if(member== )
Dje ti stoji  if(member==55)//1 ispravi broj 55 u broj koji je pored tog u ovom slucaju je to broj 1, sad taj broj 55  promjeni u 1. --  if(member==1)//1
Za sve ostale uradi isto ovako :D