Infinite Ammo On a Server
#1

Hello guys,I have the Raven's Roleplay script,and I want to make every weapon you receive to have Infinite ammo! Because in my opinion it sucks having non infinite weapon ammo!Because people may want to shoot for no reason at place where they can't hurt people
Reply
#2

pawn Код:
GivePlayerWeapon(playerid, weaponid, 10000);
Reply
#3

pawn Код:
GivePlayerWeapon(playerid, weaponid, 0x7FFFFFFF);
That will be infinite. 10000 (as seen above) will probably be 10000.
Reply
#4

Where should I put that? I'm a beginner so don't laugh
Reply
#5

Quote:
Originally Posted by DoomHunter
Посмотреть сообщение
Where should I put that? I'm a beginner so don't laugh
It's up to you. When do you want them to have the weapon?

e.g. if you want them to have it when they spawn, put it under "OnPlayerSpawn".
Reply
#6

No when they receive the weapon like : you do /sellgun u know or when you go to the lspd locker and on Raven's Roleplay is /duty but on others it is /lspd and then when I do /equip you have like a position to choose and then I want infinite ammo when you receive a weapon like : spas,desert eagle...
Reply
#7

Quote:
Originally Posted by DoomHunter
Посмотреть сообщение
No when they receive the weapon like : you do /sellgun u know or when you go to the lspd locker and on Raven's Roleplay is /duty but on others it is /lspd and then when I do /equip you have like a position to choose and then I want infinite ammo when you receive a weapon like : spas,desert eagle...
Just put the line of code underneath the CMD:duty or whatever, if you're still stuck, post the duty command here and I'll add in the line. You could then see how it would fit into other places of your code.

NOTE: For /sellgun and stuff, you wouldn't use "playerid" for the GivePlayerWeapon but whatever symbol you defined the other person as (e.g. "ID").
Reply
#8

Would you mind if I give you the whole folder zipped?
Reply
#9

Do a search in the Pawn software for all the: "GivePlayerWeapon"
And replace their number of ammo with: "0x7FFFFFFF'"

Good luck.
Reply
#10

Quote:
Originally Posted by Miado_Hulk
Посмотреть сообщение
Do a search in the Pawn software for all the: "GivePlayerWeapon"
And replace their number of ammo with: "0x7FFFFFFF'"

Good luck.
forward SafeGivePlayerWeapon(playerid, weaponid, ammo); this is all I can find...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)