need some help
#5

You should do it like this:

Before Main:
pawn Код:
new CopSkins[] = {265, 266, 267, 280, 281, 286, 288, 282, 283};
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/becomecop", cmdtext, true, 10) == 0)
    {
        if (GetPlayerScore(playerid) <= 600) return SendClientMessage(playerid, 0xFFFFFFFF, "You need atleast 600 score to become cop!");
        if (GetPlayerSkin(playerid) == CopSkins[playerid]) return SendClientMessage(playerid, 0xFFFFFFFF, "You are cop already!");

    SendClientMessage(playerid,0xFFFFFFFF,"You Are Now Cop!");
    new rand = random(sizeof(CopSkins));
    SetPlayerSkin(playerid, CopSkins[rand]);
    GivePlayerWeapon(playerid, 22, 100);
    GivePlayerWeapon(playerid, 3, 1);
    SetPlayerColor(playerid,0xFFFFFFFF);
    return 1;
  }
    return 0;
}
Just ask if you got another questions.
Reply


Messages In This Thread
need some help - by rs2fun111 - 11.01.2010, 16:01
Re: need some help - by lameguy - 11.01.2010, 16:31
Re: need some help - by rs2fun111 - 11.01.2010, 16:38
Re: need some help - by rs2fun111 - 11.01.2010, 16:50
Re: need some help - by lameguy - 11.01.2010, 17:39
Re: need some help - by rs2fun111 - 12.01.2010, 02:58
Re: need some help - by rs2fun111 - 12.01.2010, 11:42
Re: need some help - by lameguy - 12.01.2010, 12:55
Re: need some help - by rs2fun111 - 12.01.2010, 14:02

Forum Jump:


Users browsing this thread: 1 Guest(s)