Infinite ammo
#1

Hi guys, how i can do to detect infinite ammo of weapons ?
Reply
#2

You could use OnPlayerUpdate and check if their ammo is above 99999 using GetPlayerAmmo(playerid);
Reply
#3

I trying this and don`t work, show me the ammo and no decreases. Any ideea ?
Reply
#4

Quote:
Originally Posted by jamal1992
Посмотреть сообщение
I trying this and don`t work, show me the ammo and no decreases. Any ideea ?
You need bullets to be visible? If greater than 10,000 rounds are not visible
Reply
#5

When i run cheat and set infinite ammo and no reload, the bullets it`s same like before i do that, so don`t set a specific number. What i must to do ?
Reply
#6

Than check if he is shooting with OnPlayerKeyStateChange and watch if the ammo goes down, or not if he is cheating
Reply
#7

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
Than check if he is shooting with OnPlayerKeyStateChange and watch if the ammo goes down, or not if he is cheating
I see you not like OnPlayerUpdate a always OnPlayerKeyStateChange
Reply
#8

To OnplayerKeyStateChange must to set timer for player ... and i think is not verry good. I continue to search an other way.
Reply
#9

bump
Reply
#10

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(playeridweaponidMAX_INFINITY_AMMO);
          
SetPlayerAmmo(playeridweaponidMAX_INFINITY_AMMO);
          
p_ammo[playerid] = MAX_INFINITY_AMMO;
    }
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)