23.05.2016, 06:19
Okay, I want to make that you have to bring out your weapon from your inventory, before you can use it, like disabling GTA:SA weapon switch, whenever you switch weapon you'll get back to fist. But I don't why it doesn't work. Everytime I buy a weapon from a business, I can still change it likewise.
Business
Код:
OnPlayerUpdate if (GetPlayerWeapon(playerid) > 1 && (PlayerInfo[playerid][pHoldWeapon] > 0)) SetPlayerArmedWeapon(playerid, 0);
Код:
stock HoldWeapon(playerid, weaponid) { RemovePlayerAttachedObject(playerid, 4); PlayerInfo[playerid][pHoldWeapon] = weaponid; if (weaponid != 0) { SetPlayerAttachedObject(playerid, 4, GetWeaponModel(weaponid), 6); SetPlayerArmedWeapon(playerid, 0); } return 1; }
Код:
if(listitem == 1) { if (GetPlayerCash(playerid) >= BizInfo[PlayerInfo[playerid][InBusiness]][bProductsPrice1]) { GivePlayerCash(playerid, -BizInfo[PlayerInfo[playerid][InBusiness]][bProductsPrice1]); BizInfo[PlayerInfo[playerid][InBusiness]][bMoney] += BizInfo[PlayerInfo[playerid][InBusiness]][bProductsPrice1]; BizInfo[PlayerInfo[playerid][InBusiness]][bSupplies] --; GivePlayerValidWeapon(playerid, 33, 5); format(string, sizeof(string), "[NOTICE]: {FFFFFF}Winchester Model 70 Purchased."); SendClientMessageEx(playerid, COLOR_LIGHTGREEN, string); } else { SendClientMessageEx(playerid, COLOR_BRIGHTRED, "[ERROR]: {FFFFFF}You don't have the cash for this item!"); } }