GivePlayerWeaponData does not work correctly
#1

Код:
CMD:gub(playerid)
{
    new ammo2, weapon=0;
    GetPlayerWeaponData(playerid, 2, weapon, ammo2);
    if(weapon!=22 && weapon!=23 && weapon!=24)
	{
    GivePlayerWeapon(playerid, 24, 3);
	}
    else
	{
    new string[99];
    format(string, sizeof(string), "Weapon slot taken %i", weapon);
    SendClientMessage(playerid, -1, string);
    }

return 1;
}
I type /gub I get deagle. I empty the mag and gun dissappears. Then I type /gub again and I get message "Weapon slot taken 24" (24 = deagle) even thought I don't have a deagle since I shoot all the bullets and it dissappeared
Reply


Messages In This Thread
GivePlayerWeaponData does not work correctly - by ax1 - 01.09.2016, 16:40
Re: GivePlayerWeaponData does not work correctly - by DarkSkull - 01.09.2016, 16:51
Re: GivePlayerWeaponData does not work correctly - by ax1 - 01.09.2016, 17:22

Forum Jump:


Users browsing this thread: 1 Guest(s)