infinite ammo
#1

pawn Код:
if(strcmp(cmd, "/dgun", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            GetPlayerName(playerid, sendername, sizeof(sendername));
            if(PlayerInfo[playerid][pDonateRank] == 1)
            {
                format(string, sizeof(string), "*%s got an infinite ammo deagle.*", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                GivePlayerWeapon(playerid, 24, 999);
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD2, "   You are not a donator !");
                return 1;
            }
        }
        return 1;
    }
I made this command and i want to know what do i need to replace the 999 with so i get infinite ammo when using this command.
Reply
#2

Replace with 0x7FFFFFFF.
Reply
#3

You should change the 999 to 99999999999999999 or any number like that :P..

Jesse
Reply
#4

pawn Код:
GivePlayerWeapon(playerid, 24, 99999);
...?
Reply
#5

Thank you Vince, it worked.
Reply
#6

Quote:
Originally Posted by Vince
Посмотреть сообщение
Replace with 0x7FFFFFFF.
Using this. Thank you!!
Reply
#7

Quote:
Originally Posted by kaisersouse
Посмотреть сообщение
Using this. Thank you!!
Haha using this too! I can't store any weapon in my vehicles because I set it to 999999 or something! Hopefully this will fix it for me! =D

Thankyou Vince!
Reply
#8

Quote:
Originally Posted by Vince
Посмотреть сообщение
Replace with 0x7FFFFFFF.
Oooooh! defiantly going to use this in the future.

Using a define would be useful "#define AMMO 0x7FFFFFFF" "GivePlayerWeapon(playerid, 24, AMMO)"
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)