[HELP]Set weapon to 0 - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP]Set weapon to 0 (
/showthread.php?tid=136927)
[HELP]Set weapon to 0 -
whitedragon - 27.03.2010
How to set weapon ammo to 0?
Re: [HELP]Set weapon to 0 -
Sebago[X] - 27.03.2010
Re: [HELP]Set weapon to 0 -
Andy_McKinley - 27.03.2010
pawn Код:
ResetPlayerWeapons(playerid);
pawn Код:
GivePlayerWeapon(playerid, weaponid, ammo);
Re: [HELP]Set weapon to 0 -
whitedragon - 27.03.2010
Quote:
Originally Posted by DarkPhoenix
pawn Код:
ResetPlayerWeapons(playerid);
pawn Код:
GivePlayerWeapon(playerid, weaponid, ammo);
|
I want only this gun... not all
Re: [HELP]Set weapon to 0 -
MadeMan - 27.03.2010
You can use this function
pawn Код:
stock RemovePlayerWeapon(playerid, weaponid)
{
new plyWeapons[12];
new plyAmmo[12];
for(new slot = 0; slot != 12; slot++)
{
GetPlayerWeaponData(playerid, slot, plyWeapons[slot], plyAmmo[slot]);
}
ResetPlayerWeapons(playerid);
for(new slot = 0; slot != 12; slot++)
{
if(plyAmmo[slot] != 0 && plyWeapons[slot] != weaponid)
{
GivePlayerWeapon(playerid, plyWeapons[slot], plyAmmo[slot]);
}
}
return 1;
}
Re: [HELP]Set weapon to 0 -
whitedragon - 27.03.2010
Quote:
Originally Posted by MadeMan
You can use this function
pawn Код:
stock RemovePlayerWeapon(playerid, weaponid) { new plyWeapons[12]; new plyAmmo[12]; for(new slot = 0; slot != 12; slot++) { GetPlayerWeaponData(playerid, slot, plyWeapons[slot], plyAmmo[slot]); } ResetPlayerWeapons(playerid); for(new slot = 0; slot != 12; slot++) { if(plyAmmo[slot] != 0 && plyWeapons[slot] != weaponid) { GivePlayerWeapon(playerid, plyWeapons[slot], plyAmmo[slot]); } } return 1; }
|
Is it work with antihack?
Re: [HELP]Set weapon to 0 -
MadeMan - 27.03.2010
Quote:
Originally Posted by whitedragon
Quote:
Originally Posted by MadeMan
You can use this function
pawn Код:
stock RemovePlayerWeapon(playerid, weaponid) { new plyWeapons[12]; new plyAmmo[12]; for(new slot = 0; slot != 12; slot++) { GetPlayerWeaponData(playerid, slot, plyWeapons[slot], plyAmmo[slot]); } ResetPlayerWeapons(playerid); for(new slot = 0; slot != 12; slot++) { if(plyAmmo[slot] != 0 && plyWeapons[slot] != weaponid) { GivePlayerWeapon(playerid, plyWeapons[slot], plyAmmo[slot]); } } return 1; }
|
Is it work with antihack?
|
I don't know which anti-hack you use?
Re: [HELP]Set weapon to 0 -
whitedragon - 27.03.2010
Making new one
but that dont help....:P