[Pomoc] /gov

Započeo [G-Unit] Mich, Mart 25, 2011, 13:59:06 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:Cyber
Detaljan opis problema:ovako ubacim /gov i sada stavim na /makeleader stavim si PD /gov radi a onda si stavim FBI i pise da nisam policajac evo komande:
if(strcmp(cmd, "/government", true) == 0 || strcmp(cmd, "/gov", true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
if(gTeam[playerid] != 1)
{
      if(PlayerInfo[playerid][Lider] != 1)
   {
    SendClientMessage(playerid, BELA, "   Vi niste policajac !");
    return 1;
}
}
if(PlayerInfo[playerid][pRank] < 6)
{
   SendClientMessage(playerid, BELA, "   Morate biti rank 6 da bi ste Koristiteli ovo !");
   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, "Koristite: (/gov)ernment [text]");
return 1;
}
SendClientMessageToAll(COLOR_WHITE, "|___________ Vladine vijesti i Najave ___________|");
if(PlayerInfo[playerid][pFMember] == 1 || PlayerInfo[playerid][Lider] == 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), "Sluzbenik %s: %s", sendername, result); }
SendClientMessageToAll(COLOR_DBLUE, string);
}
else if(PlayerInfo[playerid][pFMember] == 2 || PlayerInfo[playerid][Lider] == 2)
{
format(string, sizeof(string), "Sluzbenik %s: %s", sendername, result);
SendClientMessageToAll(COLOR_DBLUE, string);
}
else if(PlayerInfo[playerid][pFMember] == 3 || PlayerInfo[playerid][Lider] == 3)
{
format(string, sizeof(string), "Sluzbenik %s: %s", sendername, result);
SendClientMessageToAll(COLOR_DBLUE, string);
}
else if(PlayerInfo[playerid][Lider] == 7)
{
format(string, sizeof(string), "Mayor %s: %s", sendername, result);
SendClientMessageToAll(BELA, string);
}
}
return 1;
}
Dio skripte://
Neke slike/video za lakse dobivanje pomoci(neobavezno)://
Poslednja Izmena: Mart 25, 2011, 15:14:10 POSLE PODNE od [AG] gonss.pwn bg


e evo radi hvala e mozes mi mi jos sam rec za /giverank ja kucam da dam igracu pise da igrac nije u tojg org mafiji bandi evo komanda:

CMD:giverank(playerid, params[])
{
new ID,level,string[120];
if(sscanf(params, "ud", ID,level)) return SendClientMessage(playerid, CRVENA, "Komanda: /giverank (ID/Ime) (rank)");
if(level > 6 || level < 0) return SendClientMessage(playerid, SIVA, "Rankovi su izmedu 1 i 6!");
if(PlayerInfo[playerid][Lider] < 1) return SendClientMessage(playerid, COLOR_GRAD1, "Samo Lideri mogu ovo koristiti!");
if(ID == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GRAD1, "Pogresan ID!");
if(PlayerInfo[playerid][Lider] != PlayerInfo[ID][Clan]) return SendClientMessage(playerid, COLOR_GRAD1, "Igrac nije clan vase Org/Mafije/Bande!");
PlayerInfo[ID][pRank] = level;
format(string, sizeof(string), "Dobio si veci rank od Lidera:[%s],rank:[%s]", ImeIgraca(playerid),level);
SendClientMessage(ID, SVETLOPLAVA, string);
format(string, sizeof(string), "Dao si [%s],Rank:[%d].", ImeIgraca(ID),level);
SendClientMessage(playerid, SVETLOPLAVA, string);
return true;
}
Poslednja Izmena: Mart 25, 2011, 15:11:02 POSLE PODNE od [AG] gonss.pwn bg

Citat: Barney poslato Mart 25, 2011, 14:12:46 POSLE PODNE
e evo radi hvala e mozes mi mi jos sam rec za /giverank ja kucam da dam igracu pise da igrac nije u tojg org mafiji bandi evo komanda:

CMD:giverank(playerid, params[])
{
new ID,level,string[120];
if(sscanf(params, "ud", ID,level)) return SendClientMessage(playerid, CRVENA, "Komanda: /giverank (ID/Ime) (rank)");
if(level > 6 || level < 0) return SendClientMessage(playerid, SIVA, "Rankovi su izmedu 1 i 6!");
if(PlayerInfo[playerid][Lider] < 1) return SendClientMessage(playerid, COLOR_GRAD1, "Samo Lideri mogu ovo koristiti!");
if(ID == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GRAD1, "Pogresan ID!");
if(PlayerInfo[playerid][Lider] != PlayerInfo[ID][Clan]) return SendClientMessage(playerid, COLOR_GRAD1, "Igrac nije clan vase Org/Mafije/Bande!");
PlayerInfo[ID][pRank] = level;
format(string, sizeof(string), "Dobio si veci rank od Lidera:[%s],rank:[%s]", ImeIgraca(playerid),level);
SendClientMessage(ID, SVETLOPLAVA, string);
format(string, sizeof(string), "Dao si [%s],Rank:[%d].", ImeIgraca(ID),level);
SendClientMessage(playerid, SVETLOPLAVA, string);
return true;
}

Da nije da moras prvo /invite pa tek onda /giverank

Pa jesam kad sam pd idem rank i pise da taj igrac nije u org mafiji bandi