29.04.2012, 09:10
Can enyone tell me how to give player Random Weapons if he spawns?
stock GiveRandomWeapon(playerid)
{
new rand_weapon = random( 42 );
switch( rand_weapon )
{
case 0, 19, 20, 21://invalid ids, or unarmed. Add any weaponids you don't want here
{
rand_weapon = 22;//9mm change if you want
GivePlayerWeapon( playerid, rand_weapon, 1000 );
}
default:
{
GivePlayerWeapon( playerid, rand_weapon, 1000 ); //or also create random ammo amt
}
}
}