hunted command
#1

Help me to fix this command
pawn Код:
CMD:hunted(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 4)
    {
        if(AdminDuty[playerid] != 1 && PlayerInfo[playerid][pAdmin] < 6)
        {
            SendClientMessage(playerid,COLOR_WHITE, "You're not on-duty as admin. To access your admin commands you must be on-duty. Type /aduty to go on-duty.");
            return 1;
        }
        new giveplayerid;
        new weapon[128];
        new price;
        new gun1,
        gun2,
        gun3,
        prizetype,
        price;
        if(PlayerInfo[giveplayerid][pWantedLevel] >= 1 && PlayerInfo[giveplayerid][pWantedLevel] <= 6))
        {
            return SendClientMessage(playerid, COLOR_GRAD3, "That player has a wanted level.");
        }

        if(sscanf(params, "uiiii", giveplayerid, gun1, gun2, gun3, prizetype, price))
        {
            SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /hunted [playerid/partofname] [gun] [gun2] [gun3] [prize]");
            SendClientMessage(playerid, COLOR_GREY, "Available weapons: Chainsaw, Flamethrower, Rocketlauncher, Fire Extinguisher, Spas, Deagle");
            SendClientMessage(playerid, COLOR_GREY, "Available prizes: Mats and Crack (400 materials, 20 crack), Jetpack, Full weaponset");
            return 1;

            else if(gun1 > 39 || gun1 < 0) return SendClientMessage(playerid,COLOR_GRAD2,"  Invalid weapon id? Use weapon IDs within 0-39!");
            else if(gun2 > 39 || gun2 < 0) return SendClientMessage(playerid,COLOR_GRAD2,"  Invalid weapon id? Use weapon IDs within 0-39!");
            else if(gun1 > 39 || gun3 < 0) return SendClientMessage(playerid,COLOR_GRAD2,"  Invalid weapon id? Use weapon IDs within 0-39!");
        }
        else
        {
            if(giveplayerid != playerid))
            {
                GivePlayerValidWeapon(giveplayerid, gun, 60000);
                GivePlayerValidWeapon(giveplayerid, gun2, 60000);
                GivePlayerValidWeapon(giveplayerid, gun3, 60000);
                SetPlayerColor(playerid, 0xFF80FFFF);
                hunted = giveplayerid;
                Phunted[giveplayerid] = 1;
            }
        }
    }
    return 1;
}
Reply
#2

any help
Reply
#3

And what exactly is not working the way you want it?
Reply
#4

not compiling
Reply
#5

Do you get any errors...?
Reply
#6

send the error message here
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)