How to add class? -
IvancheBG - 21.03.2011
Sorry if theres another topic like this.How to add skins(class) like CJ and others please tell.
Re: How to add class? -
Stigg - 21.03.2011
https://sampwiki.blast.hk/wiki/AddPlayerClass
https://sampwiki.blast.hk/wiki/AddPlayerClassEx
Re: How to add class? -
IvancheBG - 21.03.2011
thanks man again
Re: How to add class? -
Stigg - 21.03.2011
Quote:
Originally Posted by IvancheBG
thanks man again ![Cheesy](images/smilies/biggrin.png)
|
No worry's m8'y.
Re: How to add class? -
Stigg - 21.03.2011
If you want to add all valid skins, you can try this:
pawn Код:
for(new i = 0; i < 299; i++)
{
if(IsValidSkin(i))
{
AddPlayerClass(i,0.0,0.0,0.0,0.0,-1,-1,-1,-1,-1,-1);
}
}
Under OnGameModeInit()
With this stock function anywhere in script.
pawn Код:
stock IsValidSkin(SkinID)
{
if(0 < SkinID < 300)
{
switch(SkinID)
{
case 3..6, 8, 42, 65, 74, 86, 119, 149, 208, 273, 289: return 0;
}
return 1;
}
return 0;
}
Hope this helps.
Re: How to add class? -
IvancheBG - 21.03.2011
thanks
Re: How to add class? -
Stigg - 21.03.2011
Quote:
Originally Posted by IvancheBG
thanks
|
No prob's fella. Glad i could help ya.
Re: How to add class? -
Joyax - 15.02.2012
Ok but how i can add weapons for them like a deagle and a MP5
Re: How to add class? -
Twisted_Insane - 15.02.2012
It's all written here;
https://sampwiki.blast.hk/wiki/AddPlayerClass
[pawn]AddPlayerClass(SKIN_ID, X, Y, Z, ANGLE, WEAPON1, AMMO, WEAPON2, AMMO, WEAPON3, AMMO);
Ammo can be any amount, for example 1, the Weapon IDs can be found here:
https://sampwiki.blast.hk/wiki/Weapon_IDs
If you want the "X-Y-Z-Angle" co-ordinates for a player, join the Debug, type at the position the player should spawn "/save POSITION1" (or any other name) and then, go into your SAMP-folder! There you'll find the co-ordinates, which you simply paste into the line instead of "X-Y-Z-Angle"...
Re: How to add class? -
commander_abhi - 15.02.2012
i know i can explain you right know i think
1. AddPlayerClass = it means too add a defined player class in you server
// the function is like this
AddPlayerClass(285, 2186.3643,-1098.2234,30.4219,214.6628, 22, 100, 29, 500, 31, 500);//adding a swat skin in a server
AddPlayerClass(modelid,Float
![confused](images/smilies/confused.gif)
pawn_x,Float
![confused](images/smilies/confused.gif)
pwan_y ,Float
![confused](images/smilies/confused.gif)
pawn_z,Float
![confused](images/smilies/confused.gif)
pawn_z,Float:z_angle,0 , 0, 0, 0,0,0)//while its in a include which is where you keep the values in it
the 1st thing model id is which player like 0 = cj and 285 =swat and ect
2: those float X, Y , Z ,Z angle are the place where you want to spwan you player and in which angle
3: thoses 0,0,0,0,0,0 are the 1st 0 is the first weapons you want yo give to the player and the next is its ammo its like weapon1,ammofweapon1,weapon2,ammoofweapon2,weapon3 ,ammoofweapon3 HOPE THIS HELPS YOU
if you want to get what to write to make weapon 1 a pistol dont write the weapon name its a spcific id SEe this
"Unarmed (Fist)" // 0
"Brass Knuckles" // 1
"Golf Club"// 2
"Night Stick" // 3
"Knife"4
"Baseball Bat"// 5
"Shovel" // 6
"Pool Cue"// 7
"Katana"// 8
"Chainsaw"// 9
"Purple Dildo"// 10
"Big White Vibrator"// 11
"Medium White Vibrator"// 12
"Small White Vibrator" // 13
"Flowers"//14
"Cane" // 15
"Grenade"// 16
"Teargas"// 17
"Molotov"// 18
" "// 19
" "// 20
" "// 21
"Colt 45"// 22
"Colt 45 (Silenced)"// 23
"Desert Eagle" // 24
"Normal Shotgun"// 25
"Sawnoff Shotgun" // 26
"Combat Shotgun"// 27
"Micro Uzi (Mac 10)" // 28
"MP5"// 29
"AK47"// 30
"M4" // 31
"Tec9"// 32
"Country Rifle" // 33
"Sniper Rifle"// 34
"Rocket Launcher"// 35
"Heat-Seeking Rocket Launcher" // 36
"Flamethrower"// 37
"Minigun"// 38
"Satchel Charge"// 39
"Detonator"// 40
"Spray Can"// 41
"Fire Extinguisher"// 42
"Camera"// 43
"Night Vision Goggles"// 44
"Infrared Vision Goggles" // 45
"Parachute"// 46
"Fake Pistol"// 47
MELE WEAPONS AMMO ARE ALWAYS 0
IF I EVER HELP YOU CLICK THE START UNDER MY NAME
![Smiley](images/smilies/smile.png)
HOPE YOU HAVE FUN IN YOUR SERVER !