SA-MP Forums Archive
Houselocker problem - 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: Houselocker problem (/showthread.php?tid=427241)



Houselocker problem - Camorra - 31.03.2013

SLOVED

Thanks zxc1


Re: Houselocker problem - zxc1 - 31.03.2013

Why you use a '!' ?
pawn Код:
if(!strcmp(tmp, "take"))
It should be:
pawn Код:
if(strcmp(tmp, "take"))



Re: Houselocker problem - Camorra - 31.03.2013

I putted at house file a guns for a test and even that didnt show up.
still show 0 guns
Im testing without !
pawn Код:
new cursguns = dini_Int(filename,"sguns");
    new cursdrugs = dini_Int(filename,"sdrugs");        
SendClientMSG(playerid, COLOR_LIGHTGREY, "LOCKER: There is currently %d Guns and %d Drugs in the locker.", cursguns, cursdrugs);
        return SCP(playerid, "[ take / put ] [ sguns / sdrugs ] [ amount ]");



Re: Houselocker problem - zxc1 - 31.03.2013

Did you change the guns value in the file, while the server was running?
If yes, turn it off, change the value, turn it on again, and tell me if it's still zero.


Re: Houselocker problem - Camorra - 31.03.2013

Quote:
Originally Posted by zxc1
Посмотреть сообщение
Why you use a '!' ?
pawn Код:
if(!strcmp(tmp, "take"))
It should be:
pawn Код:
if(strcmp(tmp, "take")
Still not works.
When i doing /houselocker take sguns 1 that telling me you have put 0 sguns not takes. and for sure there inside house 100 sguns for test that just wont show the house sguns and take / put them


Re: Houselocker problem - zxc1 - 31.03.2013

I think I know what is the problem.
Are you sure the directory is "Casa%d.txt"?
And not something like "Houses/Casa%d.txt"?
This mistake happens a lot.


Re: Houselocker problem - Camorra - 31.03.2013

Quote:
Originally Posted by zxc1
Посмотреть сообщение
I think I know what is the problem.
Are you sure the directory is "Casa%d.txt"?
And not something like "Houses/Casa%d.txt"?
This mistake happens a lot.
Yes im sure, its fine and all reading the guns from house and not taking the guns or put them from player


Re: Houselocker problem - zxc1 - 01.04.2013

I found the problem.
You did not define the 'amount'.
pawn Код:
amount = strval(tmp3);



Re: Houselocker problem - Denying - 01.04.2013

Quote:
Originally Posted by zxc1
Посмотреть сообщение
Why you use a '!' ?
pawn Код:
if(!strcmp(tmp, "take"))
It should be:
pawn Код:
if(strcmp(tmp, "take"))
No.. it should be !strcmp.

It checks if the input is the same as what the scripter compared it with, in this case with 'take'.

@ Camorra: I hate people who steal other people's codes/scripts. ( You know what I mean )


Re: Houselocker problem - Camorra - 01.04.2013

Quote:
Originally Posted by Denying
Посмотреть сообщение
No.. it should be !strcmp.

It checks if the input is the same as what the scripter compared it with, in this case with 'take'.

@ Camorra: I hate people who steal other people's codes/scripts. ( You know what I mean )
They gavve it to me, keep listen to bullshits.


Quote:
Originally Posted by zxc1
Посмотреть сообщение
I found the problem.
You did not define the 'amount'.
pawn Код:
amount = strval(tmp3);
^^ Not working