02.11.2016, 09:53
Код HTML:
stock GivePlayerValidWeapon( playerid, WeaponID , Ammo) { switch( WeaponID ) { case 0, 1: { PlayerInfo[playerid][pGuns][ 0 ] = WeaponID; GivePlayerWeapon( playerid, WeaponID, 2 ); } case 2, 3, 4, 5, 6, 7, 8, 9: { PlayerInfo[playerid][pGuns][ 1 ] = WeaponID; GivePlayerWeapon( playerid, WeaponID, 2 ); } case 10, 11, 12, 13, 14, 15: { PlayerInfo[playerid][pGuns][ 10 ] = WeaponID; GivePlayerWeapon( playerid, WeaponID, 2 ); } case 16, 17, 18, 39: { PlayerInfo[playerid][pGuns][ 8 ] = WeaponID; GivePlayerWeapon(playerid, WeaponID, Ammo); PlayerInfo[playerid][pAmmo][7] = Ammo; } case 22, 23, 24: // 9mm, sdpid, DE { PlayerInfo[playerid][pGuns][ 2 ] = WeaponID; PlayerInfo[playerid][pAmmo][1] = Ammo; GivePlayerWeapon(playerid, WeaponID, Ammo); } case 25,26,27: // Shotgun, spawn-off, combat shotgun { PlayerInfo[playerid][pGuns][ 3 ] = WeaponID; PlayerInfo[playerid][pAmmo][2] = Ammo; GivePlayerWeapon(playerid, WeaponID, Ammo); } case 28,29,32: // Uzi, Tec9, Mp5 { PlayerInfo[playerid][pGuns][ 4 ] = WeaponID; PlayerInfo[playerid][pAmmo][3] = Ammo; GivePlayerWeapon(playerid, WeaponID, Ammo); } case 30,31: // M4, Ak 47 { PlayerInfo[playerid][pGuns][ 5 ] = WeaponID; PlayerInfo[playerid][pAmmo][4] = Ammo; GivePlayerWeapon(playerid, WeaponID, Ammo); } case 33,34: // rifle, sniper { PlayerInfo[playerid][pGuns][ 6 ] = WeaponID; PlayerInfo[playerid][pAmmo][5] = Ammo; GivePlayerWeapon(playerid, WeaponID, Ammo); } case 35,36,37,38: // Bazoka, RPG, Firegun, minigun { PlayerInfo[playerid][pGuns][ 7 ] = WeaponID; PlayerInfo[playerid][pAmmo][6] = Ammo; GivePlayerWeapon(playerid, WeaponID, Ammo); } case 40,41,42,43: // SPRAYCAN, FIREEXTINGUISHER, CAMERA { PlayerInfo[playerid][pGuns][ 9 ] = WeaponID; PlayerInfo[playerid][pAmmo][8] = Ammo; GivePlayerWeapon(playerid, WeaponID, Ammo); } case 44, 45, 46: { PlayerInfo[playerid][pGuns][ 11 ] = WeaponID; GivePlayerWeapon( playerid, WeaponID, LUONGDAN_BANDAU ); } } return 1; }