SA-MP Forums Archive
[BUG]GivePlayerWeapon (O_o) - 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: [BUG]GivePlayerWeapon (O_o) (/showthread.php?tid=198315)



[BUG]GivePlayerWeapon (O_o) - Riddick94 - 11.12.2010

Hey.. i had today a some bug with GivePlayerWeapon. I've a command /gun [weapon_id] [ammo] and skills of weapons to one hand. One pistol, sawn-0ff etc. After i wrote /gun 22 100 (Pistol and 100 ammo) ammuntion to magazine has set to 34.. not 17.

Screens:
Before spawn gun with ammo:
/imageshack/img828/9...ungoodammo.jpg

After spawn pistol with 9 ammo (9 ammo had add to Spare):
/imageshack/img692/9...zineonegun.jpg


Re: [BUG]GivePlayerWeapon (O_o) - Faraday - 11.12.2010

Would be helpful if you showed the code for the command here...


Re: [BUG]GivePlayerWeapon (O_o) - Riddick94 - 11.12.2010

Код:
CMD:bron(playerid, cmdtext[])
{
    new weaponid, ammo, string[256];
	if(sscanf(cmdtext, "id", weaponid, ammo))return SendClientMessage(playerid, COLOR_WHITE, "*Wpisz: /bron [id_broni] [amunicja]");
	GivePlayerWeapon(playerid, weaponid, ammo);
	format(string,sizeof(string),"*** Zespawnowałeś broń {50BF54}%s {FFFFFF}[{FF3333}ID{FFFFFF}: {FF3333}%d{FFFFFF}] {50BF54}z ilością {FF3333}%d {50BF54}sztuk amunicji.", WeaponNames[weaponid], weaponid, ammo);
	SendClientMessage(playerid, COLOR_WHITE, string);
	return true;
}
Legend:
Wpisz - Write.
/bron - /weapon.
[id_broni] - [weapon_id]
[amunicja] - [ammo]


Re: [BUG]GivePlayerWeapon (O_o) - niCe - 12.12.2010

I can confirm this. When players are given the ammo, it's set like the players have the maximum skill level, even if they don't. Once player switches to other weapon and then back, the ammo in the magazine is set to the correct value.


Re: [BUG]GivePlayerWeapon (O_o) - Norck - 12.12.2010

I also confirm this.


Re: [BUG]GivePlayerWeapon (O_o) - DRIFT_HUNTER - 18.09.2011

I guess these is GTA bug but its still need to be fixed