problems with Inventory includ - 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)
+--- Thread: problems with Inventory includ (
/showthread.php?tid=387029)
problems with Inventory includ -
Amine_Mejrhirrou - 22.10.2012
i'm using Joe staff includ (that i recomande to every one who is looking for one of this system) .
i've tryed to edit it a bit (in order to make it compatible with my Game Mod)
but i have a problem
i'm using dini in that includ to check if the players is a team member in order change the inventory slot for faction teams but it's not working
i found that the problem is that the includ can't detect if a player file has a variable (i don't know if it's the correct way to say it)
for example
Код:
stock AddItem(playerid,ItemName[],Amount)
{
new slot=-1;
format(file, sizeof(file), USER_FILE, GetPName(playerid));
if(dini_Int(file, "team")== 0)
{
blablabla
the problem is that the includ can't detect if the layer "team" varible is on 0 or not so even if your "team" valu is higher than 0 , u will get the codes of a team == 0
AW: problems with Inventory includ -
Johndaonee - 22.10.2012
its because you include the file before the team variable
Put the include inside your script or just create the team thing before the inventory functions