SA-MP Forums Archive
hunted command - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: hunted command (/showthread.php?tid=493690)



hunted command - aboa - 09.02.2014

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;
}



Re: hunted command - aboa - 09.02.2014

any help


Re: hunted command - Manyula - 09.02.2014

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


Re: hunted command - aboa - 09.02.2014

not compiling


Re: hunted command - Manyula - 09.02.2014

Do you get any errors...?


Re: hunted command - AhmedMohamed - 09.02.2014

send the error message here