Jump to content
  • 0

Question

Posted

Deci,sa va explic .

Aici aveti comanda gov:

[pawn]//--- -------------------------------[government]-----------------------------------------------

if(strcmp(cmd, "/government", true) == 0 || strcmp(cmd, "/gov", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

if(gTeam[playerid] != 2)

{

    SendClientMessage(playerid, COLOR_GREY, "  You are not a Cop !");

    return 1;

}

if(PlayerInfo[playerid][pRank] < 5)

{

    SendClientMessage(playerid, COLOR_GREY, "  You need to be Rank 5 to be able to use this !");

    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, "{00A1FF}USAGE{FFFFFF}: (/gov)ernment [text]");

return 1;

}

SendClientMessageToAll(COLOR_WHITE, "|___________ Government News Announcement ___________|");

format(string, sizeof(string), "{FFFFFF}Officer {0009B0}%s: {FFFFFF}%s", sendername, result);

SendClientMessageToAll(COLOR_DBLUE, string);

}

return 1;

}

[/pawn]

acum,eu imi dau leader in NG/PD/FBI si cand dau /gov,nu imi apare :You not a Cop!

Eu cred,ca problema consta in:

if(gTeam[playerid] != 2)

Dar,am modificat-o si tot asa apare.

Va implor,daca puteti,sa rezolvati comanda va sunt recunoscator.

Si aa.. la comanda /helpers,apare doar cei de level 1.

Problema este:if(PlayerInfo[pHelper] == 1) ,deci,intrebarea mea,cum as putea sa rezolv aceste 2 comenzi?La /helpers nu stiu cum sa fac doua accese,adica Daca pui h1,nu apare cei de level 2.Daca pui h2,nu apare cei de level 1.

Multumesc.

Sper ca la aceasta problema sa imi raspundeti,nu ca la cealanta.

1 answer to this question

Recommended Posts

Posted

la /gov poti folosi in loc de    if(gTeam[playerid] != 2) :

if (PlayerInfo[playerid][pLeader] != x || PlayerInfo[playerid][pLeader] != y || PlayerInfo[playerid][pLeader] != z)

Si in loc de x,y,z pui ID de la factiunile cops !

ps: e pentru leaderi gov? daca vrei si pt membri pui [pMember] in loc de  [pLeader]

la /helpers merge if(PlayerInfo[pHelper] >= 1)    ? sau vrei sa ai nume diferite in functie de level ?

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.