SA-MP Forums Archive
Spawn Weapon 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 Weapon Help (/showthread.php?tid=212983)



Spawn Weapon Help - AzTeCaS - 18.01.2011

Hello Guys I want do this Fonction

When Player Death Save He Weapon
and When Player Spawn give him He Weapon

Can one help me please?

great


Re: Spawn Weapon Help - DarrenThayer - 18.01.2011

You can do this using https://sampwiki.blast.hk/wiki/GetPlayerWeaponData... Now you basicly you just save all the information under OnPlayerDisconnect


Re: Spawn Weapon Help - AzTeCaS - 18.01.2011

Just Tell me How


Re: Spawn Weapon Help - Alex_Valde - 18.01.2011

Quote:
Originally Posted by AzTeCaS
Посмотреть сообщение
Just Tell me How
|Please Don't Write Like This.|

Quote:
Originally Posted by DarrenThayer
Посмотреть сообщение
You can do this using https://sampwiki.blast.hk/wiki/GetPlayerWeaponData... Now you basicly you just save all the information under OnPlayerDisconnect
^He just told you. Use dini/y_ini/MySQL/SII/What ever way you want to save it in players file.


Re: Spawn Weapon Help - Kase - 18.01.2011

Top of the script:

pawn Код:
new pSpawnWeapon[MAX_PLAYERS][13],
    pSpawnAmmo[MAX_PLAYERS][13];
Under OnPlayerDeath:
pawn Код:
for(new i; i < 13; i++)
{
    GetPlayerWeaponData(playerid, i, pSpawnWeapon[playerid][i], pSpawnAmmo[playerid][i]);
}
Under OnPlayerSpawn:
pawn Код:
for(new i; i < 13; i++)
{
   GivePlayerWeapon(playerid, pSpawnWeapon[playerid][i], pSpawnWeapon[playerid][i]);
}
That should work.


Re: Spawn Weapon Help - AzTeCaS - 18.01.2011

thnx for this Help n1 kasy