Tazer 1 bullet ! HELP
#1

okay so, this is the tazer CMD to take it out

Код:
 PlayerHasTazer[playerid] = 1;

				GivePlayerAdminGun(playerid, 23);
				SetPlayerArmedWeapon(playerid,23);
				format(string, sizeof(string), "* %s unholsters his pistol tazer.", PlayerRPName(playerid));
				ProxDetector(30.0, playerid, string,              COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
How can I make the tazer have 1 bullet & recharges each shot without disappearing and reloads one shot again with /reload anim & shoots

This GivePlayerAdminGun params sucks, it gives u full silencer magazine, 17 bullets
Reply
#2

To do that, you'll need to use GivePlayerWeapon function to assign him 2 bullet, after that use the SetPlayerArmedWeapon.
After that under OnPlayerKeyStateChange -> KEY_FIRE you'll need to check if the player has tazer and he's shot once using if function and GetPlayerWeaponData. Then when check if the bullet is 1, this would confirm that the player shot once, after that Apply Reload anim to it. And then again set the Ammo to 2. It's not that hard.
PM me if you need more help on this. I'll explain you more about it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)