PDA

View Full Version : AddPlayerClass HELP


Fantje
05/03/2015, 02:42 PM
Heey guys

I want to have 4 guns in each class but I can only have 3.

My line:

AddPlayerClass(287,211.4132,1898.1892,16.9663,0.0, COMBAT_SHOTGUN,3000,DEAGLE,200,M4,2100,MP5,2100); // Army

Error:

C:\Users\Administrator\Desktop\SvT Mike\gamemodes\SvTMike.pwn(509) : warning 202: number of arguments does not match definition
C:\Users\Administrator\Desktop\SvT Mike\gamemodes\SvTMike.pwn(509) : warning 202: number of arguments does not match definition

My Defines:

#define PISTOL 22
#define SILENCED_PISTOL 23
#define DEAGLE 24
#define AK47 30
#define M4 31
#define TEC9 32
#define MICRO_UZI 28
#define MP5 29
#define GRENADES 16
#define MOLOTOVS 18
#define TEAR_GAS 17
#define NIGHT_STICK 3
#define KNIFE 4
#define SHOTGUN 25
#define SAWNOFF_SHOTGUN 26
#define COMBAT_SHOTGUN 27
#define MICRO_UZI 28
#define SNIPER_RIFLE 34
#define RPG 35
#define ROCKET_LAUNCHER 36
#define FLAME_THROWER 37
#define MINIGUN 38
#define SPRAY_PAINT 41
#define FIRE_EXTINGUER 42
#define PARACHUTE 46
#define SACHET_CHARGERS 39
#define DETONATOR 40

Please help :)

Kaliber
05/03/2015, 02:47 PM
I want to have 4 guns in each class but I can only have 3.
You recognized the problem :D

You can give the player only 3 guns..if you want to give him more, u must give him weapons under OnPlayerSpawn with GivePlayerWeapon (http://wiki.sa-mp.com/wiki/GivePlayerWeapon)

Greekz :cool:

MikE1990
05/03/2015, 02:50 PM
AddPlayerClass have only 11 parameters,if you want to give more than 3 weapons i suggest you to use GivePlayerWeapon :)
AddPlayerClass(287,211.4132,1898.1892,16.9663,0.0, COMBAT_SHOTGUN,3000,DEAGLE,200,M4,2100);

Fantje
05/03/2015, 02:51 PM
Thanks :)