Checking if a player has weapon equipment
#1

Hey, creating a weapon equipment system so for a player to be able to get weapons, he must go to a certain point (Marina docks) and type /exportequipment. When the player types this command, a dialog opens and they can choose between legal and illegal guns... Once they make their choice, they click on the gun in the dialog and it sets the player as "having weapon equipment on them" (PlayerStats[playerid][HasWeaponEquipment] = 1). The player then has to go to an gun store and type /assembleweapon and it checks if the player has weapon equipment (PlayerStats[playerid][HasWeaponEquipment] = 1) and if they do, it gives them the gun they clicked on earlier at the docks. My problem is, how will I check what weapon the player chose at the docks?

Example:

at the ammunation store when the player has the equipmen

pawn Код:
cmd:assembleweapon(playerid, params[])
{
 if(PlayerStat[playerid][HasWeaponEquipment] == 1)
{
if(IsPlayerInRangeOfPoint(playerid, blah blah blah))
{
// what will I do here? I'm not sure how to give them the weapon they chose earlier
PlayerStat[playerid][HasWeaponEquipment] = 1;
}
etc
Please give me a hand, thank you!
Reply
#2

Use [MAX_WEAPONS] as another dimension in the array
Reply
#3

Quote:
Originally Posted by DavidBilla
Посмотреть сообщение
Use [MAX_WEAPONS] as another dimension in the array
Thanks mate. Could you please give me an example of where and how I would use it with my code?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)