[HELP] Spawn Weapon?
#1

hello,

can some one tell me how to make spawn weapon. that when player die the weapon will always with him except if he is leaving. i hope u understand what i mean
Reply
#2

so you mean like when they spawn they have one weapon and when they die and respawn they still have that weapon but when they /q and rejoin they dont has that weapon?
Reply
#3

yes like what u said
Reply
#4

lol then its all in the AddPlayerClass


this is just copy from samp.wiki
Код:
AddPlayerClass(skin, Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo)
Код:
skin	The skin which the player will spawn with.
Float:X	The X coordinate of the spawnpoint of this class.
Float:Y	The Y coordinate of the spawnpoint of this class.
Float:Z	The Z coordinate of the spawnpoint of this class.
Float:Angle	The direction in which the player should face after spawning.
weapon1	The first spawn-weapon for the player.
weapon1_ammo	The amount of ammunition for the primary spawnweapon.
weapon2	The second spawn-weapon for the player.
weapon2_ammo	The amount of ammunition for the second spawnweapon.
weapon3	The third spawn-weapon for the player.
weapon3_ammo	The amount of ammunition for the third spawnweapon.
for weapon lists go here

https://sampwiki.blast.hk/wiki/Weapons

soo for example

Код:
//This goes under OnGameModeInIt
//This is Teh Pimps skin (not jizzy)
AddPlayerClass(249,-2653.6443,1388.2767,7.1301,212.8453, 23,272,29,270,5,1 );
soo the bold parts are ammo and weapon ids

if you want just one weapon then do

Код:
//This is from the PlayerClass from above
AddPlayerClass(249,-2653.6443,1388.2767,7.1301,212.8453,23,272,  0,0,0,0 );
The bold is the other weapon slots that you can add weapons to, right now the skin has one weapon

its a Silenced 9mm

you can change the weapons by gettin the IDs from

https://sampwiki.blast.hk/wiki/Weapons

remember

Код:
AddPlayerClass(skin, Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo)
weapons and ammo MUST go as they are shown hope this helped if it didnt just check

https://sampwiki.blast.hk/wiki/AddPlayerClass
Reply
#5

lol not that its like a when they buy a spawn weapon menu they get a weapon and then when they die the weapon still on him
Reply
#6

so have a look in the onplayerspawn callback

idk i didnt really understand your first question sorry for ur time
Reply
#7

its ok pal
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)