16.08.2018, 14:49
Hello guys,I got an script on my gamemode that you can switch weapons while you're passenger with Y and N command
This is the script and I want to disable some weapons like deagle,combat shotgun because they rapid fire while drive-by.Can someone help me please?
This is the script and I want to disable some weapons like deagle,combat shotgun because they rapid fire while drive-by.Can someone help me please?
Код:
if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER && IsBulletWeapon(GetPVarInt(playerid, "switch_WeaponID"))) { // Next Weapon if(newkeys & KEY_YES) { new curWeap = GetPVarInt(playerid, "switch_WeaponID"), weapSlot = GetWeaponSlot(curWeap), weapID, weapAmmo; for(new i = weapSlot + 1; i <= 7; i++) { GetPlayerWeaponData(playerid, i, weapID, weapAmmo); if(IsBulletWeapon(weapID) && weapID != curWeap) { SetPlayerArmedWeaponEx(playerid, weapID); GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~y~~h~Next Weapon ~>~", 1000, 3); break; } } } // Previous Weapon if(newkeys & KEY_NO) { new curWeap = GetPVarInt(playerid, "switch_WeaponID"), weapSlot = GetWeaponSlot(curWeap), weapID, weapAmmo; for(new i = weapSlot - 1; i >= 2; i--) { GetPlayerWeaponData(playerid, i, weapID, weapAmmo); if(IsBulletWeapon(weapID) && weapID != curWeap) { SetPlayerArmedWeaponEx(playerid, weapID); GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~y~~h~~<~ Previous Weapon", 1000, 3); break; } } } }