Re: How to Make a Command That Bans an Offline Player [ZCMD + y_ini + Sscanf] -
gtakillerIV - 15.08.2013
Thanks. If anyone has a problem, feel free to ask.
Re: How to Make a Command That Bans an Offline Player [ZCMD + y_ini + Sscanf] -
Kurvits - 17.08.2013
That is under the DIALOG_REGISTER like you said.
Код:
INI_WriteString(File, "Ip", IP, 22);
warning 202: number of arguments does not match definition
Re: How to Make a Command That Bans an Offline Player [ZCMD + y_ini + Sscanf] -
gtakillerIV - 18.08.2013
My bad. Fixed now. Thanks.
Re: How to Make a Command That Bans an Offline Player [ZCMD + y_ini + Sscanf] -
ThaCrypte - 20.08.2013
pawn Код:
new INI:File = INI_Open(UserPath(filestring));
// error 035: argument type mismatch (argument 1)
Re: How to Make a Command That Bans an Offline Player [ZCMD + y_ini + Sscanf] -
Ryu- - 11.11.2013
Well I got a little problem, I tried those codes, but when I test it, it doesn't work. So I try to find it out, then I remove the [24] from
Quote:
if(sscanf(params, "s[24]", targetname)) return SendClientMessage(playerid, -1, "COMMAND: /banofflineplayer [Player's name]")
|
Then it works properly, so I guess it doesn't need to add [24] into "s". Beside that you've added the [24] into targetname. Well if I was wrong, please give me the right answer, cause I'm a newbie

, Thank you very much BTW.
Re: How to Make a Command That Bans an Offline Player [ZCMD + y_ini + Sscanf] -
PakistaniBaba - 11.11.2013
Good!!!
Re: How to Make a Command That Bans an Offline Player [ZCMD + y_ini + Sscanf] -
Voxel - 13.11.2013
Im going to use this thanks

!
Re: How to Make a Command That Bans an Offline Player [ZCMD + y_ini + Sscanf] -
420Scripter - 13.11.2013
Wow, nice.
Re: How to Make a Command That Bans an Offline Player [ZCMD + y_ini + Sscanf] -
Spiritser - 25.12.2013
Great! But how to ban all offline players or unban?
Please show.
Re: How to Make a Command That Bans an Offline Player [ZCMD + y_ini + Sscanf] -
gtakillerIV - 25.12.2013
You'll have to loop through all the user files. Which from what I know is impossible in pawn without using a plugin.
ThaCrypte, Ryu-: All fixed long ago. Sorry for not replying.
Re: How to Make a Command That Bans an Offline Player [ZCMD + y_ini + Sscanf] -
Spiritser - 05.01.2014
Plugin exist? Where can I download it?
Tnx.
Re: How to Make a Command That Bans an Offline Player [ZCMD + y_ini + Sscanf] -
gtakillerIV - 06.01.2014
Thanks for notifying me. Sscanf link has been fixed.
Re: How to Make a Command That Bans an Offline Player [ZCMD + y_ini + Sscanf] -
DerickClark - 19.04.2014
pawn Код:
(2217) : error 028: invalid subscript (not an array or too many subscripts): "BannedIP"
(2217) : warning 215: expression has no effect
(2217) : error 001: expected token: ";", but found "]"
(2217) : error 029: invalid expression, assumed zero
(2217) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
Line 2217:
pawn Код:
format(cmdstring, sizeof(cmdstring), "unbanip %s", BannedIP[playerid]);
pawn Код:
CMD:unbanofflineplayer(playerid, params[])
{
new string[128],tname[24];
if(sscanf(params, "s[24]", tname)) return SendClientMessage(playerid,-1,"Correct Usage: /unbanofflineplayer [Player Name] ");
new filestring[79];
format(filestring, sizeof(filestring), "/Users/%s.ini", tname);
if(!fexist(filestring)) return SendClientMessage(playerid, -1, "The name you've chosen was not found in our database ");
else
{
new INI:File = INI_Open(filestring);
INI_SetTag(File, "data");
INI_WriteInt(File, "Banned",0);
INI_Close(File);
INI_ParseFile(filestring, "LoadIP_%s", .bExtra = true , .extra = playerid);
new cmdstring[44];
format(cmdstring, sizeof(cmdstring), "unbanip %s", BannedIP[playerid]);
SendRconCommand(cmdstring);
SendRconCommand("reloadbans");
new done[128];
format(done, sizeof(done),"You have successfully unbanned %s", tname);
SendClientMessage(playerid, -1,done);
}
return 1;
}
Re: How to Make a Command That Bans an Offline Player [ZCMD + y_ini + Sscanf] -
gtakillerIV - 19.04.2014
Thank you for telling me!
It should be:
pawn Код:
PlayerInfo[playerid][BannedIP]
Sorry about that.
Re: How to Make a Command That Bans an Offline Player [ZCMD + y_ini + Sscanf] -
DerickClark - 19.04.2014
Quote:
Originally Posted by gtakillerIV
Thank you for telling me!
It should be:
pawn Код:
PlayerInfo[playerid][BannedIP]
Sorry about that.
|
Its Okay, Thank you for the tut.
Re: How to Make a Command That Bans an Offline Player [ZCMD + y_ini + Sscanf] -
YanLanger - 04.10.2014
Nice tutorial.
Re: How to Make a Command That Bans an Offline Player [ZCMD + y_ini + Sscanf] -
Rudy_ - 04.10.2014
pawn Код:
warning 235: public function lacks forward declaration (symbol "LoadIP_data")
You haven't forwarded it in the tutorial
pawn Код:
public LoadIP_data(playerid, name[], value[])
And it'd be good if you could add reason?
Re: How to Make a Command That Bans an Offline Player [ZCMD + y_ini + Sscanf] -
EncikBuyer - 16.08.2015
Nice.