PDA

View Full Version : [HELP]Give random weapon HELP ME = REP+ xD


InTeL_cOrE_i7
10/06/2013, 01:10 PM
Code i used or tryed:
GivePlayerWeapon(playerid, random(16, 17, 18), 3);

What i want to do:
i want to give player random weapon, but only the one in brackets, random(16, 17, 18)

InTeL_cOrE_i7
10/06/2013, 01:13 PM
help me

Parka
10/06/2013, 01:17 PM
stock GiveRandomWeapon(playerid)
{
new Rand = random( 3 );
switch( Rand )
{
case 0: GivePlayerWeapon( playerid, 16, 1000);
case 1: GivePlayerWeapon( playerid, 17, 1000);
case 2: GivePlayerWeapon( playerid, 18, 1000);
}
}

InTeL_cOrE_i7
10/06/2013, 01:17 PM
stock GiveRandomWeapon(playerid)
{
new Rand = random( 3 );
switch( Rand )
{
case 0: GivePlayerWeapon( playerid, 16, 1000);
case 1: GivePlayerWeapon( playerid, 17, 1000);
case 2: GivePlayerWeapon( playerid, 18, 1000);
}
}


thank you