[Help] Command
#1

What's wrong with this?

pawn Код:
new RandomWeapons[][] =
{
    {38},
    {36},
    {16},
    {39},
    {44},
    {28},
    {26},
    {24},
    {8}
};
pawn Код:
CMD:randomweapon(playerid, params[])
{
   new Weapons = random(sizeof(RandomWeapons));
   GivePlayerWeapon(playerid, RandomWeapons[Weapons], 5000);
   return 1;
}
Thanks.
Reply
#2

pawn Код:
CMD:randomweapon(playerid, params[])
{
   new Weapons = RandomSet(38,36,16,39,44,28,26,24,8);
   GivePlayerWeapon(playerid, RandomWeapons[Weapons], 5000);
   return 1;
}

stock RandomSet(...) return getarg(random(numargs()));
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)