Weapon Spawner! "/Sniper"
#1

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)
Reply
#2

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

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
Reply
#4

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
Reply
#5

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

@ 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.)
Reply
#7

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)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)