Help Please! - 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: Help Please! (
/showthread.php?tid=477933)
Help Please! -
itsCody - 27.11.2013
I'm using this include that uses LookupFFS, and I cannot grab if the user is using a proxy.
Does anyone have any idea what could be doing this? When a player connects it won't tell me if they're using a proxy.
pawn Код:
public OnLookupComplete(playerid)
{
new string[128];
new pname[24];
GetPlayerName(playerid,pname,sizeof(pname));
new ip[16];
GetPlayerIp(playerid,ip,16);
if(IsProxyUser(playerid))
{
format(string,sizeof(string),"{208DD6}[SERVER] {FFFFFF}%s[%d] has been kicked from the server. (Possible Proxy).",pname,playerid);
SendClientMessageToAll(COLOR_ADMIN,string);
SetTimerEx("KickPlayer", 1000, false, "i", playerid);
}
format(string,sizeof(string),"7%s[%d] has joined the server. (Proxy: %s).",pname,playerid,IsProxyUser(playerid));
Say(IRC_ADMINCHANNEL,string);
return 1;
}
The url to the include:
https://sampforum.blast.hk/showthread.php?tid=460410
Thanks guys.
Re: Help Please! -
cessil - 27.11.2013
because IsProxyUser would return a boolean not a string
format(string,sizeof(string),"7%s[%d] has joined the server. (Proxy: %s).",pname,playerid,IsProxyUser(playerid) ? "Yes" : "No");
Re: Help Please! -
itsCody - 27.11.2013
Ah thanks, but what about this O_O
error 001: expected token: "-string end-", but found "-identifier-"
I'm sorry if I'm so noobish, I just haven't touched PAWN in so long :/
Re: Help Please! -
Firewire - 27.11.2013
Quote:
Originally Posted by itsCody
error 001: expected token: "-string end-", but found "-identifier-"
|
That error is generated because you're missing a "
;" on the end of your code/line you were working on.
-Firewire
Re: Help Please! -
itsCody - 27.11.2013
Quote:
Originally Posted by Firewire
That error is generated because you're missing a ";" on the end of your code/line you were working on.
-Firewire
|
I have all of my ";"
:/
Re: Help Please! -
cessil - 27.11.2013
I was being lazy but you can try this
http://forum.sa-mp.com/showpost.php?...61&postcount=2
Re: Help Please! -
Konstantinos - 27.11.2013
Quote:
Originally Posted by cessil
because IsProxyUser would return a boolean not a string
format(string,sizeof(string),"7%s[%d] has joined the server. (Proxy: %s).",pname,playerid,IsProxyUser(playerid) ? "Yes" : "No");
|
Use parenteses around the text. It's a known compiler bug (
https://sampforum.blast.hk/showthread.php?tid=355877).
pawn Код:
format(string,sizeof(string),"7%s[%d] has joined the server. (Proxy: %s).",pname,playerid,(IsProxyUser(playerid)) ? ("Yes") : ("No"));