Jump to content
  • 0

Help:>


bL3s

Question

Am aceasta comanda pe server:D si as vrea sa stiu cum pot face ca atunci cand un lider scrie de exemplu: "/giverank gigel 5" lui gigel sa ii deie skinul cutare..:| adica la rank 5 sa ii deie 1 skin la rank 4 alt skin.. etc.:D

Dar la fiecare factiune sa fie alte skinuri:D

Se poate?:))

if(strcmp(cmd, "/giverank", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /giverank [playerid/PartOfName] [Number(1-5)]");

return 1;

}

new para1;

new level;

para1 = ReturnUser(tmp);

tmp = strtok(cmdtext, idx);

level = strval(tmp);

if(level > 5 || level < 0) { SendClientMessage(playerid, COLOR_GREY, "  Dont go below number 0, or above number 5!"); return 1; }

if (PlayerInfo[playerid][pLeader] >= 1)

{

    if(IsPlayerConnected(para1))

    {

        if(para1 != INVALID_PLAYER_ID)

        {

GetPlayerName(para1, giveplayer, sizeof(giveplayer));

GetPlayerName(playerid, sendername, sizeof(sendername));

PlayerInfo[para1][pRank] = level;

format(string, sizeof(string), "  You have been promoted to a higher Rank by Leader %s", sendername);

SendClientMessage(para1, COLOR_LIGHTBLUE, string);

format(string, sizeof(string), "  You have given %s Rank %d.", giveplayer,level);

SendClientMessage(playerid, COLOR_LIGHTBLUE, string);

}

}

}

else

{

SendClientMessage(playerid, COLOR_GRAD1, "  you are not authorized to use that command(Leaders Only)!");

}

}

return 1;

}

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

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.