Jump to content

Recommended Posts

Posted

63yq35.png

Introduction

Folosirea numerelor pentru Arme este destul de Confunzatoare, asa ca am creat acest INCLUDE.

Example

  • GivePlayerWeapon( playerid, DESERT_EAGLE );

Download

[*] Direct | Mirror

142sj0l.png

Underground-GFX

Posted

In a_samp.inc:

// Weapons
#define WEAPON_BRASSKNUCKLE				(1)
#define WEAPON_GOLFCLUB					(2)
#define WEAPON_NITESTICK				(3)
#define WEAPON_KNIFE					(4)
#define WEAPON_BAT						(5)
#define WEAPON_SHOVEL					(6)
#define WEAPON_POOLSTICK				(7)
#define WEAPON_KATANA					(8)
#define WEAPON_CHAINSAW					(9)
#define WEAPON_DILDO					(10)
#define WEAPON_DILDO2					(11)
#define WEAPON_VIBRATOR					(12)
#define WEAPON_VIBRATOR2				(13)
#define WEAPON_FLOWER					(14)
#define WEAPON_CANE						(15)
#define WEAPON_GRENADE					(16)
#define WEAPON_TEARGAS					(17)
#define WEAPON_MOLTOV					(18)
#define WEAPON_COLT45					(22)
#define WEAPON_SILENCED					(23)
#define WEAPON_DEAGLE					(24)
#define WEAPON_SHOTGUN					(25)
#define WEAPON_SAWEDOFF					(26)
#define WEAPON_SHOTGSPA					(27)
#define WEAPON_UZI						(28)
#define WEAPON_MP5						(29)
#define WEAPON_AK47						(30)
#define WEAPON_M4						(31)
#define WEAPON_TEC9						(32)
#define WEAPON_RIFLE					(33)
#define WEAPON_SNIPER					(34)
#define WEAPON_ROCKETLAUNCHER			(35)
#define WEAPON_HEATSEEKER				(36)
#define WEAPON_FLAMETHROWER				(37)
#define WEAPON_MINIGUN					(38)
#define WEAPON_SATCHEL					(39)
#define WEAPON_BOMB						(40)
#define WEAPON_SPRAYCAN					(41)
#define WEAPON_FIREEXTINGUISHER			(42)
#define WEAPON_CAMERA					(43)
#define WEAPON_PARACHUTE				(46)
#define WEAPON_VEHICLE					(49)
#define WEAPON_DROWN					(53)
#define WEAPON_COLLISION				(54)

Posted

Nu prea e folositor , ce-ai facut tu intr-un include se poate face foarte usor cu un define.

Stiu si eu ... branza e pe bani, dar eu tot ma joc pe gratis!

Posted

Defapt am facut asta ca sa invat ceva...

public OnFilterScriptInit( )

{

  new wName[ 50 char ];

  print( "enum" );

  print( "{"    );

  for( new w = 0; w <= 46; w ++ )

  {

      if( !IsInvalidWeapon( w ) )

      {

        GetWeaponName( w, wName, sizeof wName );

        printf( "%s, // WeapID - %d", wName, w );

      }

  }

  print( "};" );

 

  return ( 1 );

}

IsInvalidWeapon( WeapID )

{

  switch( WeapID )

  {

      case 19, 20, 21: return ( 1 );

  }

  return ( 0 );

}


Intelegeti ?

142sj0l.png

Underground-GFX

Posted

Defapt am facut asta ca sa invat ceva...

public OnFilterScriptInit( )
{
	new wName[ 50 char ];
	print( "enum" );
	print( "{"    );
	for( new w = 0; w <= 46; w ++ )
	{
		if( !IsInvalidWeapon( w ) )
		{
			GetWeaponName( w, wName, sizeof wName );
			printf( "%s, // WeapID - %d", wName, w );
		}
	}
	print( "};" );

	return ( 1 );
}

IsInvalidWeapon( WeapID )
{
	switch( WeapID )
	{
		case 19, 20, 21: return ( 1 );
	}
	return ( 0 );
}

Intelegeti ?

Nice. Mai bine invatai fara sa postezi aici.

De la TEARGAS in colo nu cred ca va mai merge exact, pentru ca ai intrerupt ID-urile, enum le numeroteaza din 1 in 1. ( 0, 1, 2, 3 ... 17, 18, 19, 20, 21 ... 45, 46, 47, 48 )

Posted

Folositor, nici nu stiam ca exista

// Weapons
#define WEAPON_BRASSKNUCKLE				(1)
#define WEAPON_GOLFCLUB					(2)
#define WEAPON_NITESTICK				(3)
#define WEAPON_KNIFE					(4)
#define WEAPON_BAT						(5)
#define WEAPON_SHOVEL					(6)
#define WEAPON_POOLSTICK				(7)
#define WEAPON_KATANA					(8)
#define WEAPON_CHAINSAW					(9)
#define WEAPON_DILDO					(10)
#define WEAPON_DILDO2					(11)
#define WEAPON_VIBRATOR					(12)
#define WEAPON_VIBRATOR2				(13)
#define WEAPON_FLOWER					(14)
#define WEAPON_CANE						(15)
#define WEAPON_GRENADE					(16)
#define WEAPON_TEARGAS					(17)
#define WEAPON_MOLTOV					(18)
#define WEAPON_COLT45					(22)
#define WEAPON_SILENCED					(23)
#define WEAPON_DEAGLE					(24)
#define WEAPON_SHOTGUN					(25)
#define WEAPON_SAWEDOFF					(26)
#define WEAPON_SHOTGSPA					(27)
#define WEAPON_UZI						(28)
#define WEAPON_MP5						(29)
#define WEAPON_AK47						(30)
#define WEAPON_M4						(31)
#define WEAPON_TEC9						(32)
#define WEAPON_RIFLE					(33)
#define WEAPON_SNIPER					(34)
#define WEAPON_ROCKETLAUNCHER			(35)
#define WEAPON_HEATSEEKER				(36)
#define WEAPON_FLAMETHROWER				(37)
#define WEAPON_MINIGUN					(38)
#define WEAPON_SATCHEL					(39)
#define WEAPON_BOMB						(40)
#define WEAPON_SPRAYCAN					(41)
#define WEAPON_FIREEXTINGUISHER			(42)
#define WEAPON_CAMERA					(43)
#define WEAPON_PARACHUTE				(46)
#define WEAPON_VEHICLE					(49)
#define WEAPON_DROWN					(53)
#define WEAPON_COLLISION				(54)

:))...

Fara reclama in semnatura!

Posted

enum-ul parca nu incepea numerotarea de la 0 ? Ce ai facut tu e cam asa:

BRASS_KNUCKLE, - ar fi ID 0, dar ar trebui ID 1

Rezolvare:

Schimba

enum
{
	BRASS_KNUCKLE,		// WeapID - 1
in
enum
{
	BRASS_KNUCKLE = 1,		// WeapID - 1

Nu mai posta chestii netestate pe viitor.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.