Need help to spawn with a weapon
#1

Hai, i need help to know how to do so i spawn with a weapon, example: I spawn and then i have a chainsaw and some other weapons. I don't get this to work and yes, im new to pwn scripting.

Thanks for ya help --- Petter_Henrik ---
Reply
#2

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

look there
Reply
#3

Or, you can alternatively give the player the weapon where the code OnPlayerSpawn(playerid) is.

Example:
pawn Код:
public OnPlayerSpawn(playerid)
{
GivePlayerWeapon(playerid, 38, 99999); // Minigun with unlimited Ammo.
}
Reply
#4

Quote:
Originally Posted by Calgon
Or, you can alternatively give the player the weapon where the code OnPlayerSpawn(playerid) is.

Example:
pawn Код:
public OnPlayerSpawn(playerid)
{
GivePlayerWeapon(playerid, 38, 99999); // Minigun with unlimited Ammo.
}
Yes, Both ways work. If you want to use less lines then use my suggestion or use Calgon's.
Reply
#5

Quote:
Originally Posted by x-ray313
Quote:
Originally Posted by Calgon
Or, you can alternatively give the player the weapon where the code OnPlayerSpawn(playerid) is.

Example:
pawn Код:
public OnPlayerSpawn(playerid)
{
GivePlayerWeapon(playerid, 38, 99999); // Minigun with unlimited Ammo.
}
Yes, Both ways work. If you want to use less lines then use my suggestion or use Calgon's.
If I recall correctly - You can only spawn 2 weapons using the AddPlayerClass function.
Reply
#6

You can have 3 with AddPlayerClass, and as many as you want with the alternative way.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)