[HELP] Save Weapons
#1

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
Reply
#2

If your command looked somehow like:

Quote:

/savegun gunid

you might put

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)