SA-MP Forums Archive
Need help to spawn with a weapon - 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: Need help to spawn with a weapon (/showthread.php?tid=96132)



Need help to spawn with a weapon - DonTSHootMi - 06.09.2009

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


Re: Need help to spawn with a weapon - Criss_Angel - 06.09.2009

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

look there


Re: Need help to spawn with a weapon - Calgon - 06.09.2009

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.
}



Re: Need help to spawn with a weapon - Criss_Angel - 06.09.2009

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.


Re: Need help to spawn with a weapon - Calgon - 06.09.2009

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.


Re: Need help to spawn with a weapon - Clavius - 06.09.2009

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