05.03.2013, 18:19
hey all,
i was making this Trunk system, and i made that you can store weapons in your trunk, but now i want to make it that you can take the weapons OUT of the trunk again, but how can i do this in a fast way?
i mean i dont want all kinds of "if" cases...
i use 1 variable which can store 4 different kinds of weapons, since you can't get any other weapons in my server.
so i would have to do at Take Weapons:
i would have to do this for each kind of weapon, and also i store different kinds of weaponids into this variable... so it would become a HUGE code, so i was wondering, is there a faster way to do this?
i want to show the player a dialog if he has any weapons in his trunk, and which will show the weapons he has in the trunk... but how to do this in a fast way with a small amount of code?
greets
i was making this Trunk system, and i made that you can store weapons in your trunk, but now i want to make it that you can take the weapons OUT of the trunk again, but how can i do this in a fast way?
i mean i dont want all kinds of "if" cases...
i use 1 variable which can store 4 different kinds of weapons, since you can't get any other weapons in my server.
pawn Код:
Player[playerid][TrunkWeaps[4];
pawn Код:
if(Player[playerid][TrunkWeaps[0] != -1 && Player[playerid][TrunkWeap[1] == -1 && Player[playerid][TrunkWeap[2] == -1 && Player[playerid][TrunkWeap[3] == -1)
i want to show the player a dialog if he has any weapons in his trunk, and which will show the weapons he has in the trunk... but how to do this in a fast way with a small amount of code?
greets