11.04.2016, 08:55
PHP код:
// global
RemoveIdxFromArray(array[], idx, size = sizeof array) {
while(++idx < size) {
array[i - 1] = array[i];
}
array[size - 1] = 0;
}
// You code
new
idx = PlayerData[playerid][pSelectedSlot],
faction = PlayerData[playerid][pFactionEdit]
;
RemoveIdxFromArray(FactionData[faction][factionAmmo], idx);
RemoveIdxFromArray(FactionData[faction][factionWeapons], idx);
SendServerMessage(playerid, "You have removed the weapon in slot %d.", idx + 1);