SA-MP Forums Archive
Weapon Problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Weapon Problem (/showthread.php?tid=576473)



Weapon Problem - KaiserOfGermany - 04.06.2015

Hi Guys, i have a problem...

What i can put to toggle a really ugly bug?

i have a TDM Gamemode, it start whit Weapons: Mp5, Deagle, Shotgun, Knife, Sniper and M4

i have created a select weapon system, \w whit a dialog, it work, but theres a bug, example if i pick a sawn off shotgun it will don t replace the shotgun, and if press E or Q it dont change weapon!

Please Help me, theres any type of SetplayerWeap who can help to repair this bug ? please help me...


Re: Weapon Problem - JaydenJason - 04.06.2015

might be the ammo, if the weapon switches then switches back it's a problem with the ammo or your anticheat, but from what you say we can't do anything to help you, provide code please.


Re: Weapon Problem - KaiserOfGermany - 04.06.2015

Quote:
Originally Posted by JaydenJason
Посмотреть сообщение
might be the ammo, if the weapon switches then switches back it's a problem with the ammo or your anticheat, but from what you say we can't do anything to help you, provide code please.
http://pastebin.com/kbX9tBkP

example:

1) i have shotgun

2) but i press \w and i pick the sawnoff

3) it compears the bug, i cant move whit E and Q, because theres 2 weapons on 1 type of weapon, so what i can do to have only sawnoff?



And i don t have any anticheat for weapons....


Re: Weapon Problem - JaydenJason - 04.06.2015

It's impossible to have 2 weapons of 1 type, try using 99999 instead of "cellmax"


Re: Weapon Problem - KaiserOfGermany - 05.06.2015

Quote:
Originally Posted by JaydenJason
Посмотреть сообщение
It's impossible to have 2 weapons of 1 type, try using 99999 instead of "cellmax"
so i modify the ammo? and it resolve the bug? can you put here a simple script ? example like: i have shotgun, if i type \w and pick sawnoff, can discompear shotgun and appear only sawnoff, so bug can be resolved...


Re: Weapon Problem - J0sh... - 05.06.2015

Umm, SA-MP doesn't let you have 2 same weapon types. GivePlayerWeapon auto removes the other one.


Re: Weapon Problem - KaiserOfGermany - 05.06.2015

Quote:
Originally Posted by Jamester
Посмотреть сообщение
Umm, SA-MP doesn't let you have 2 same weapon types. GivePlayerWeapon auto removes the other one.
yea i have SetPlayerweapon, it changes anything?

LOL GUYS THE PROBLEM IS I AFTER \W I CAN T MOVE WHIT E and Q it cant move the weapons menu, because there s 2 weapons, how to toggle it ?


Re: Weapon Problem - JaydenJason - 05.06.2015

I find it hard to understand this.. well you could try using if(listitem == 0) etc because switch(listitem) doesnt do anything last time i tried to use it, could you go further into details? I'm sorry

edit; now i understand you, looking at the first post..

You have to use if(listitem == 1) etc instead of switch(listitem)