24.02.2015, 09:55
Quote:
GivePlayerValidWeapon( playerid, WeaponID, Ammo ) { if((PlayerInfo[playerid][pConnectTime] < 2 || PlayerInfo[playerid][pWRestricted] > 0) && WeaponID != 46 && WeaponID != 43) return 1; switch( WeaponID ) { case 0, 1: { PlayerInfo[playerid][pGuns][ 0 ] = WeaponID; GivePlayerWeapon( playerid, WeaponID, Ammo ); } case 2, 3, 4, 5, 6, 7, 8, 9: { PlayerInfo[playerid][pGuns][ 1 ] = WeaponID; GivePlayerWeapon( playerid, WeaponID, Ammo ); } case 22, 23, 24: { PlayerInfo[playerid][pGuns][ 2 ] = WeaponID; GivePlayerWeapon( playerid, WeaponID, Ammo ); } case 25, 26, 27: { PlayerInfo[playerid][pGuns][ 3 ] = WeaponID; GivePlayerWeapon( playerid, WeaponID, Ammo ); } case 28, 29, 32: { PlayerInfo[playerid][pGuns][ 4 ] = WeaponID; GivePlayerWeapon( playerid, WeaponID, Ammo ); } case 30, 31: { PlayerInfo[playerid][pGuns][ 5 ] = WeaponID; GivePlayerWeapon( playerid, WeaponID, Ammo ); } case 33, 34: { PlayerInfo[playerid][pGuns][ 6 ] = WeaponID; GivePlayerWeapon( playerid, WeaponID, Ammo ); } case 35, 36, 37, 38: { PlayerInfo[playerid][pGuns][ 7 ] = WeaponID; GivePlayerWeapon( playerid, WeaponID, Ammo ); } case 16, 17, 18, 39, 40: { PlayerInfo[playerid][pGuns][ 8 ] = WeaponID; GivePlayerWeapon( playerid, WeaponID, Ammo ); } case 41, 42, 43: { PlayerInfo[playerid][pGuns][ 9 ] = WeaponID; GivePlayerWeapon( playerid, WeaponID, Ammo ); } case 10, 11, 12, 13, 14, 15: { PlayerInfo[playerid][pGuns][ 10 ] = WeaponID; GivePlayerWeapon( playerid, WeaponID, Ammo ); } case 44, 45, 46: { PlayerInfo[playerid][pGuns][ 11 ] = WeaponID; GivePlayerWeapon( playerid, WeaponID, Ammo ); } } return 1; |
What should I change?
Because everytime I make myself a gun it gives me unlimited ammo, I want to change it to 500.
Can someone help me?