SA-MP Forums Archive
[HELP] Save Weapons - 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: [HELP] Save Weapons (/showthread.php?tid=149125)



[HELP] Save Weapons - FreddeN - 20.05.2010

Hello,

I'm trying to create a /sellweapon command, and I've added this to my script:

Код:
enum pInfo
{
  pGun1,
  pGun2,
};
new PlayerInfo[MAX_PLAYERS][pInfo];
And I have also added the pGun to my /login and /register commands plus my SaveStats function.

What I need to know is, how to make the script to understand that pGun will save the Weapon ID, so the player will have that weapon ingame when the command is used on a player..

If you need more info, just give me the word.

Thanks


Re: [HELP] Save Weapons - juice.j - 20.05.2010

If your command looked somehow like:

Quote:

/savegun gunid

you might put

Код:
PlayerInfo[playerid][gunid]=gunid;
somewhere inside your cmd code.


Re: [HELP] Save Weapons - FreddeN - 20.05.2010

Quote:
Originally Posted by juice.j
If your command looked somehow like:

Quote:

/savegun gunid

you might put

Код:
PlayerInfo[playerid][gunid]=gunid;
somewhere inside your cmd code.
Alright, I will try this out.

Pawno tells me that the tag mismatch in PlayerInfo[playerid][gunid] = gunid;