Simple Problem. -
stojan - 31.12.2012
Hi,
Okay so I have 2 filterscripts to make code easier to read and to not have 1000 lines in 1 script, so it confuses me.
Okay, so I have Login/Register that contains:
How can I access that variable from my second filterscript?
Thanks
Re: Simple Problem. -
JaKe Elite - 31.12.2012
You can't
You mean how can you access something like
like that?.
Then no you can't.
Unless you put the 2nd filterscript to your gamemode or to the script you are using in.
Re: Simple Problem. -
Konstantinos - 31.12.2012
You can't. I've read that it's possible only with Pvars, unless you make an include.
Why don't you use 1 filterscript, no matter how many the lines are, it just does its work.
Re: Simple Problem. -
stojan - 31.12.2012
Thanks for help guys.
Ill do it in 1 filterscript. Thanks
Re: Simple Problem. -
stojan - 31.12.2012
Okay guys, I'm trying to learn pawno, but this code wont work
Код:
new cmd[10], params[8];
sscanf(cmdtext, "ss", cmd, params);
if(!strcmp(cmd, "/Hi"))
{
SendClientMessage(playerid, 0xFFFFFFFF, params);
return 1;
}
Always returns SERVER ERROR: unknown command.
Re: Simple Problem. -
JaKe Elite - 31.12.2012
pawn Код:
if(strcmp(cmdtext, "/Hi", true, 3) == 0)
{
new str[128];
if(sscanf(cmdtext, "s[128]", cmdtext)) return SendClientMessage(playerid, -1, "/Hi <message>");
format(str, sizeof(str), "%s", cmdtext);
SendClientMessage(playerid, 0xFFFFFFFF, str);
return 1;
}
Re: Simple Problem. -
Konstantinos - 31.12.2012
Why don't you use ZCMD with sscanf and you use strcmp which is slower. It's also easier!
pawn Код:
CMD:hi(playerid, params[])
{
if(isnull(params)) return SendClientMessage(playerid, -1, "/Hi <message>");
new
str[ 128 ]
;
format(str, sizeof(str), params);
SendClientMessage(playerid, 0xFFFFFFFF, str);
return 1;
}
Also, isnull can be used for this situation and it's better than sscanf. Any other parameter, just use sscanf as you did.
Re: Simple Problem. -
stojan - 05.01.2013
Okay guys, I managed to get it working. Can you please tell me can this be hacked:
GetPVarInt
SetPVarInt
Are they server sided or client sided? By that i mean if user can hack values via Memory Trainers.
Thanks
Re: Simple Problem. -
wouter0100 - 06.01.2013
Server sided, so no.