Fast question. - 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: Fast question. (
/showthread.php?tid=251553)
Fast question. -
sim_sima - 27.04.2011
Okay... Made a thread before, and it seems to be way too long, cus nobody is answering it.
The question is:
When the player dies, he loses his weapons. I dont want that to happend. How do i fix that?
Thanks.
Re: Fast question. -
sim_sima - 27.04.2011
Nobody knows how?
Re: Fast question. -
Joe Staff - 27.04.2011
I uncertain if you can receive player weapon info when a player dies, but here's how it will work if you can:
pawn Код:
new pWeaponsOnDeath[13];
nee pAmmoOnDeath[13];
public OnPlayerDeath(playerid,killerid,reason)
{
for(new w;w<13;w++;)
{
GetPlayerWeaponData(playerid,w,pWeaponsOnDeath[w],pAmmoOnDeath[w]);
}
}
public OnPlayerSpawn(playerid)
{
for(new w;w<13;w++;)GivePlayerWeapon(playerid,pWeaponsOnDeath[w],pAmmoOnDeath[w]);
}
public OnPlayerConnect(playerid)
{
for(new w;w<13;w++)
{
pWeaponsOnDeath[w]=0;
pAmmoOnDeath[w]=0;
}
}
Re: Fast question. -
sim_sima - 27.04.2011
Oh, thanks, ill take a look