Not working :/
#1

id 37 is flame thrower
and if 38 is the minigun
and it still gives them and i dont want it too
pawn Код:
public GiveRandomWeapon(playerid)
{
    new rand = random(39);
    if(rand == 0 || rand == 19 || rand == 20 || rand == 21 || rand == 37 || rand == 38)
    {
        random(39);
    }
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        GivePlayerWeapon(i,rand,500);
    }
    return 1;
}
Reply
#2

I didn't get you.
You don't want to give any weapons, or what?
Reply
#3

Quote:
Originally Posted by Delux13
Посмотреть сообщение
I didn't get you.
You don't want to give any weapons, or what?
Quote:
Originally Posted by Delux13
Посмотреть сообщение
I didn't get you.
You don't want to give any weapons, or what?
i want to it to give weapons but exept the ones selected like:
pawn Код:
if(rand == 0 || rand == 19 || rand == 20 || rand == 21 || rand == 37 || rand == 38)
i dont want the random to choose those, look again at the code...
Reply
#4

so you want it to give them a random weapons but only the ids youve listed?
Reply
#5

Quote:
Originally Posted by hadzx
Посмотреть сообщение
so you want it to give them a random weapons but only the ids youve listed?
-.-!!! No i want to give weapons, but exept the one's listed because they are the minigun + flame thrower and undefined id's..
Reply
#6

pawn Код:
new
    r;

do
{
    r = random(39);
}
while(r == 0 || r == 19 || r == 20 || r == 21 || r == 37 || r == 38);

GivePlayerWeapon(playerid, r, 500);
Reply
#7

pawn Код:
public GiveRandomWeapon(playerid)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    new rand = random(39);
    if(rand != 0 && rand != 19 && rand != 20 && rand != 21 || rand != 37 && rand != 38)
    {
             GivePlayerWeapon(i,rand,500);
     }
     else
     {
            GiveRandomWeapon(i);
    }
  }
    return 1;
}
try this
Reply
#8

edit : sorry error 94
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)