24.01.2019, 17:15
Can someone tell me why this code just gives 1 weapon at the player?
I want to give 1 weapon for every set. Like 1 deagle, 1 sawn, 1 uzi, 1 grenade etc.
I want to give 1 weapon for every set. Like 1 deagle, 1 sawn, 1 uzi, 1 grenade etc.
pawn Code:
new RandomWeapon[][2] =
{
// {Weapon ID, Amount of Ammo}
{22, 320}, // 9mm
{24, 320}, // Desert Eagle
{26, 320}, // Sawnoff Shotgun
{27, 320}, // Combat Shotgun
{28, 320}, // Micro SMG/Uzi
{29, 320}, // MP5
{30, 320}, // AK-47
{32, 320}, // Tec-9
{16, 10}, // Grenade
{18, 10} // Molotov Cocktail
};
new wep = random(sizeof(RandomWeapon));
GivePlayerWeapon(playerid, RandomWeapon[wep][0], RandomWeapon[wep][1]);