SA-MP Forums Archive
Weapon Spawner! "/Sniper" - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Weapon Spawner! "/Sniper" (/showthread.php?tid=188105)



Weapon Spawner! "/Sniper" - Larsey123IsMe - 06.11.2010

Hmmm, What is the code(pwn) to spawn a weapon?:

This is all i got
Код:
GivePlayerWeapon(playerid,25, 500); SniperRifle
Huh?

BTW i am new with scripting, But i have made something (who works xD)


Re: Weapon Spawner! "/Sniper" - Seven. - 06.11.2010

This will give the player a sniper rifle with 500 ammo. Put it under onplayerspawn so when he spawns he will recieve this weapon.


Re: Weapon Spawner! "/Sniper" - Kwarde - 06.11.2010

Indeed
pawn Код:
GivePlayerWeapon(playerid, WEAPON_ID, AMMO);
Here is a list of all the weapon ID's: http://weedarr.wikidot.com/gunlist
So you can se that a SniperRifle is 34, and not 25 25 is a shotgun (I think, wait..)
Yes, a shotgun
For example, give a player a sniper with 500 ammo:

pawn Код:
GivePlayerWeapon(playerid, 34, 500);
[EDIT]
Lol Seven posted while I was making this reply.
But whatever, @Seven: It should be a good idea to tell too that Id 25 ain't a sniper rifle


Re: Weapon Spawner! "/Sniper" - Larsey123IsMe - 06.11.2010

Quote:
Originally Posted by Kwarde
Посмотреть сообщение
Indeed
pawn Код:
GivePlayerWeapon(playerid, WEAPON_ID, AMMO);
Here is a list of all the weapon ID's: http://weedarr.wikidot.com/gunlist
So you can se that a SniperRifle is 34, and not 25 25 is a shotgun (I think, wait..)
Yes, a shotgun
For example, give a player a sniper with 500 ammo:

pawn Код:
GivePlayerWeapon(playerid, 34, 500);
[EDIT]
Lol Seven posted while I was making this reply.
But whatever, @Seven: It should be a good idea to tell too that Id 25 ain't a sniper rifle
Aww Thank You my hero


Re: Weapon Spawner! "/Sniper" - Kwarde - 06.11.2010

Quote:
Originally Posted by Larsey123IsMe
Посмотреть сообщение
Aww Thank You my hero
I'm Superman :O
Nah just kidding, whatever,
No problem


Re: Weapon Spawner! "/Sniper" - Seven. - 06.11.2010

@ kwarde, I assumed that id 25 was a springfield but thanks for telling him anyway ;P

(Great scripting help tool is SA-MP Script King. It has all id's (cars, sounds, weapons, pickups etc.)


Re: Weapon Spawner! "/Sniper" - Kwarde - 06.11.2010

Quote:
Originally Posted by Seven.
Посмотреть сообщение
@ kwarde, I assumed that id 25 was a springfield but thanks for telling him anyway ;P

(Great scripting help tool is SA-MP Script King. It has all id's (cars, sounds, weapons, pickups etc.)
About the weapon ID: Nah it was shotgun :P
About the SA-MP Script King tool: Indeed , I'm using it.
Here's the topic: https://sampforum.blast.hk/showthread.php?tid=35399
Download link: http://www.worldofstunt.com/index.ph...tpmod;dl=item6
I recommend you to read the topic first (No I'm talking to you Seven. :P)