18.06.2015, 12:56
Код:
if (newkeys & KEY_WALK) { new M4A1[32], AssaultAmmoEquiped[32],total[64]; if(PlayerInfo[playerid][pM4A1] > 0) { format(M4A1, sizeof(M4A1), "M4A1: %d", PlayerInfo[playerid][pM4A1]); } if(PlayerInfo[playerid][pAssaultAmmoEquiped] > 0) { format(AssaultAmmoEquiped, sizeof(AssaultAmmoEquiped), "(%d)", PlayerInfo[playerid][pAssaultAmmoEquiped]); } format(total, sizeof(total), "%s %s", M4A1, AssaultAmmoEquiped); ShowPlayerDialog(playerid, DIALOG_INVENTORY, DIALOG_STYLE_LIST, "Inventory", total, "Select", "Cancel"); return 1; } if (newkeys & KEY_CROUCH) { if(IsValidObject(LootObjects[0]) && IsPlayerInRangeOfPoint(playerid,2.0,2384.59448,-1674.36279,13.74557)) { PlayerInfo[playerid][pM4A1] ++; SendClientMessage(playerid, COLOR_GREEN, "* 1 M4A1 has been added to your inventory"); DestroyObject(LootObjects[0]); } }