taking weapons from the trunk, whats a fast way to script it?
#1

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.

pawn Код:
Player[playerid][TrunkWeaps[4];
so i would have to do at Take Weapons:

pawn Код:
if(Player[playerid][TrunkWeaps[0] != -1 && Player[playerid][TrunkWeap[1] == -1 && Player[playerid][TrunkWeap[2] == -1 && Player[playerid][TrunkWeap[3] == -1)
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
Reply
#2

Hello,
Sorry mate, but you are not asking actually for help only for entire script. Writing whole script is not the same as help with it.

Please head over here (Script Request Thread) and write your request again.

Maybe someone will find time to write it for you.
Or you can still take an attempt to make it on your own.

BTW.
pawn Код:
Player[playerid][TrunkWeaps[4]; // not that way
Player[playerid][TrunkWeaps[4]]; // but that
Greetz,
LetsOWN
Reply
#3

hai, i found a way myself, but i didnt saw those [ and ] missing xD thanks, ill check the code once more to make sure there arent any errors/buggs
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)