A lil help
#1

Like with the code below, it said "AK-47 time and it gave me sawn-offs.
i want it to say the name of the weapon it tells me.
I have a new aweaponnames.. on the top of my script so dont ask me if i have it. The anwser is yes.
pawn Код:
public GiveRandomWeapon(playerid)
{
    new r,string[128];
    do
    {
        r = random(39);
    }
    while(r == 0 || r == 19 || r == 20 || r == 21 || r == 37 || r == 38);
    GivePlayerWeapon(playerid, r, 500);
    format(string, sizeof(string), "~w~%s ~r~time!",aWeaponnames[(r)]);
    GameTextForAll(string, 3000, 3);
    return 1;
}
Reply
#2

you could probably have mixed up ids
Reply
#3

Maybe your aWeaponnames has just a wrong order, or you left out some names. Ak-47 has to have the index 30 for example.
Reply
#4

Quote:
Originally Posted by Mauzen
Посмотреть сообщение
Maybe your aWeaponnames has just a wrong order, or you left out some names. Ak-47 has to have the index 30 for example.
Made it my self:
pawn Код:
new aWeaponnames[33][] =
{
    {"Brass knuckles"},
    {"Golf club"},
    {"Nite stick"},
    {"Knife"},
    {"Baseball bat"},
    {"Shovel"},
    {"Pool cue"},
    {"Kantana"},
    {"Chainsaw"},
    {"Purple dildo"},
    {"Short vibrator"},
    {"Long vibrato"},
    {"White dildo"},
    {"Flowers"},
    {"Cane"},
    {"Grenades"},
    {"Tear gas"},
    {"Molotov cocktail"},
    {"9mm Pistol"},
    {"Silenced pistol"},
    {"Desert eagle"},
    {"Shotgun"},
    {"Sawn-off shotgun"},
    {"Combat shotgun"},
    {"Micro Uzi"},
    {"Mp5"},
    {"Ak47"},
    {"M4"},
    {"Tec 9"},
    {"Country rifle"},
    {"Sniper rifle"},
    {"Rpg"},
    {"Heat seeking rocket"}
};
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)