03.09.2015, 06:54
(
Последний раз редактировалось Logofero; 03.09.2015 в 07:13.
Причина: Updated
)
Other methods do not. You can do this via the Memory hack, but it will be more difficult.
PHP код:
new bool:p_infinity[MAX_PLAYERS];
#define MAX_INFINITY_AMMO (9999)
public OnPlayerSpawn(playerid) {
p_infinity[playerid] = true;
return 1;
}
public OnPlayerUpdate(playerid) {
static
p_ammo[MAX_PLAYERS]
;
new weaponid = GetPlayerWeapon(playerid);
if (p_infinity[playerid] && weaponid && p_ammo[playerid] > GetPlayerAmmo(playerid) || p_ammo[playerid] < MAX_INFINITY_AMMO) {
GivePlayerWeapon(playerid, weaponid, MAX_INFINITY_AMMO);
SetPlayerAmmo(playerid, weaponid, MAX_INFINITY_AMMO);
p_ammo[playerid] = MAX_INFINITY_AMMO;
}
return 1;
}