need help with ban command which ban's the account of the player not the ip. -
mittukuttan - 23.01.2013
with sscanf+zcmd plz.
Re: need help with ban command which ban's the account of the player not the ip. -
FUNExtreme - 23.01.2013
We have a topic for requesting scripts/snippets.
https://sampforum.blast.hk/showthread.php?tid=187229
Re: need help with ban command which ban's the account of the player not the ip. -
antonio112 - 23.01.2013
Well, banning an account is simple. You have to create a new variable, called (for example) 'PlayerBanned' and then, when you ban someone, set that variable to either 1 or true (if you use a bool). Now, when a player connects, check if the variable is 1 or true, meaning he's banned. If yes, kick that player.
Of course, in the ban command, don't use the function
Ban. Just set the variable to true and kick player.
I might be able to create you the command but I have no idea how you save variables, so you'll have to save the banned variable yourself in the player file.
Re: need help with ban command which ban's the account of the player not the ip. -
mittukuttan - 23.01.2013
can someone help me plz.i can't do the thing which u told sorry.
AW: need help with ban command which ban's the account of the player not the ip. -
Blackazur - 23.01.2013
Код:
COMMAND:ban(playerid,params[])
{
new id, grund[144];
if(sscanf(params,"ds",id,grund)) return NoSuccess(playerid,"Usage: /ban id reason");
format(str,144,"» Admin %s banned %s, reason: %s",pname[playerid],pname[id],grund);
SendClientMessageToAll(RED,str);
Ban(id);
return 1;
}
Re: need help with ban command which ban's the account of the player not the ip. -
mittukuttan - 23.01.2013
C:\Users\intel\Desktop\New Folder\Roleplay Base Script\gamemodes\lfgr.pwn(954) : error 017: undefined symbol "NoSuccess"
C:\Users\intel\Desktop\New Folder\Roleplay Base Script\gamemodes\lfgr.pwn(956) : error 017: undefined symbol "str"
C:\Users\intel\Desktop\New Folder\Roleplay Base Script\gamemodes\lfgr.pwn(956) : warning 215: expression has no effect
C:\Users\intel\Desktop\New Folder\Roleplay Base Script\gamemodes\lfgr.pwn(956) : error 001: expected token: ";", but found "]"
C:\Users\intel\Desktop\New Folder\Roleplay Base Script\gamemodes\lfgr.pwn(956) : error 029: invalid expression, assumed zero
C:\Users\intel\Desktop\New Folder\Roleplay Base Script\gamemodes\lfgr.pwn(956) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
5 Errors.
plz help me guys.
AW: need help with ban command which ban's the account of the player not the ip. -
Blackazur - 23.01.2013
Код:
COMMAND:ban(playerid,params[])
{
new id, grund[144];
if(sscanf(params,"ds",id,grund)) return SendClientMessage(playerid,"Usage: /ban id reason");
format(str,144,"» Admin %s banned %s, reason: %s",pname[playerid],pname[id],grund);
SendClientMessageToAll(RED,str);
Ban(id);
return 1;
}
Try now.