Spawn Weapons Help - 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: Spawn Weapons Help (
/showthread.php?tid=57981)
Spawn Weapons Help -
deathghost - 13.12.2008
Hello, I need help with Spawn Weapons
For example: When a player is on the server he wants to buy spawn weapons that when he dies he get the weapons back
I dont have any idea of how doin this
Thanks for Ideas
Re: Spawn Weapons Help -
LarzI - 13.12.2008
Save the weapons and ammo into variables.
Re: Spawn Weapons Help -
hamptonin - 13.12.2008
he mean
you must check what weapons he have if he go die
and then if he spawn load the weapons
Re: Spawn Weapons Help -
deathghost - 13.12.2008
may u guys gimme a code that may help me?
I am not understanding..
thanks
Re: Spawn Weapons Help -
LarzI - 13.12.2008
pawn Код:
//Over main (under includes)
new
weapon[MAX_PLAYERS],
ammo[MAX_PLAYERS];
public OnPlayerDeath(playerid, killerid, reason)
{
weapon[playerid] = GetPlayerWeapon(playerid),
ammo[playerid] = GetPlayerAmmo(playerid);
return true;
}
public OnPlayerSpawn(playerid)
{
GivePlayerWeapon(playerid, weapon[playerid], ammo[playerid]);
return true;
}
Re: Spawn Weapons Help -
RedFusion - 29.11.2010
Only saves one weapon for me.