Custom weapon. - 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: Custom weapon. (
/showthread.php?tid=565870)
Re : Custom weapon. -
Baltimore - 22.03.2015
Yes, why it starts at 9 ?
Probably because there are 9 weapons, but how to make it begins to 0?
And why it goes 9 to 38 ?
Re: Custom weapon. -
arjanforgames - 22.03.2015
Try: 'new w = 0;' instead of 'new w;'
Re : Re: Custom weapon. -
Baltimore - 22.03.2015
Quote:
Originally Posted by arjanforgames
Try: 'new w = 0;' instead of 'new w;'
|
Not work
Re : Custom weapon. -
Baltimore - 28.03.2015
UP, please.
Re : Custom weapon. -
Baltimore - 28.03.2015
pawn Код:
#define MAX_CUSTOM_WEAPONS (40)
enum E_WEAPON_DATA
{
wep_CustomName[25],
wep_BaseWeapon,
Float:wep_Damage
}
static wep_Data[MAX_CUSTOM_WEAPONS][E_WEAPON_DATA],
wep_Total;
DefineCustomWeapon(weaponName[], baseweapon, Float:damage)
{
format(wep_Data[wep_Total][wep_CustomName], 25, "%s", weaponName);
wep_Data[wep_Total][wep_BaseWeapon] = baseweapon;
wep_Data[wep_Total][wep_Damage] = damage;
return wep_Total++;
}
In OnGameModeInit use DefineCustomWeapon.
And use:
pawn Код:
for(new w; w < sizeof(wep_Data); w++)
{
printf("w = %d", w);
}
For look the problems.
Re : Custom weapon. -
Baltimore - 28.03.2015
I can compile...
http://pastebin.com/QjshFVMb
Re : Custom weapon. -
Baltimore - 28.03.2015
I have not tried the pastebin code I gave you, but in theory it should do the same worries.
Re : Custom weapon. -
Baltimore - 28.03.2015
it's good.
other problem:
https://sampforum.blast.hk/showthread.php?tid=569186
Re : Custom weapon. -
Baltimore - 06.04.2015
okkk
Re: Custom weapon. -
Baltimore - 02.05.2015
You have a code for removeplayerweapon? For custom weapon