Custom weapon.
#21

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 ?
Reply
#22

Try: 'new w = 0;' instead of 'new w;'
Reply
#23

Quote:
Originally Posted by arjanforgames
Посмотреть сообщение
Try: 'new w = 0;' instead of 'new w;'
Not work
Reply
#24

UP, please.
Reply
#25

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.
Reply
#26

I can compile...

http://pastebin.com/QjshFVMb
Reply
#27

I have not tried the pastebin code I gave you, but in theory it should do the same worries.
Reply
#28

it's good.

other problem:
https://sampforum.blast.hk/showthread.php?tid=569186
Reply
#29

okkk
Reply
#30

You have a code for removeplayerweapon? For custom weapon
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)