BAN Command -
SeanDenZYR - 10.12.2016
can someone teach me how to make a ban command? with ZCMD please.
Re: BAN Command -
SyS - 10.12.2016
No one taught anyone here most of them learned by themselves. Like that you should also try. This isn't a herculean task.
Re: BAN Command -
saffierr - 10.12.2016
This section is to help you with the code you've scripted yourself. I'd suggest you to learn the basics first. Read/Watch tutorials, that's how you can learn.
Re: BAN Command -
silverms - 10.12.2016
if u need to learn how to make ban command u first need to know the basics of zcmd and then basics of Ban(variable)
and then u will be good to go if u need to ask u need to ask on something that rly need help from other not a ban command
Re: BAN Command -
Luicy. - 11.12.2016
PHP код:
// Open a command ofc
CMD:ban(playerid, params[]) { // Notice the "params[]", they're needed.
if(IsPlayerAdmin(playerid)) { // check if player is rcon
new targetid; // empty int
if(sscanf(params, "i", targetid)) { // check if the input was like /ban 0
Ban(playerid); // ban him using the samp func
}
else
SendClientMessage(playerid, -1, "SYNTAX: /ban playerid");
}
return 1;
}
Re: BAN Command -
ISmokezU - 11.12.2016
Quote:
Originally Posted by Luicy.
PHP код:
// Open a command ofc
CMD:ban(playerid, params[]) { // Notice the "params[]", they're needed.
if(IsPlayerAdmin(playerid)) { // check if player is rcon
new targetid; // empty int
if(sscanf(params, "i", targetid)) { // check if the input was like /ban 0
Ban(playerid); // ban him using the samp func
}
else
SendClientMessage(playerid, -1, "SYNTAX: /ban playerid");
}
return 1;
}
|
are you an idiot? why would you ban the "playerid" instead of the targetid,lol.
Do what the others said and try and understand by yourself and if you get any problems,check back here,
List Of Bans Commands.
Re: BAN Command -
BiosMarcel - 11.12.2016
Quote:
Originally Posted by ISmokezU
are you an idiot? why would you ban the "playerid" instead of the targetid,lol.
Do what the others said and try and understand by yourself and if you get any problems,check back here, List Of Bans Commands.
|
No need to call him an idiot, everyone makes mistakes.
Re: BAN Command -
ISmokezU - 11.12.2016
Quote:
Originally Posted by [Bios]Marcel
No need to call him an idiot, everyone makes mistakes.
|
Yeah true my bad,sorry but isn't he a girl "luicy" what kind of guy has a girl name?
Re: BAN Command -
BiosMarcel - 11.12.2016
Quote:
Originally Posted by ISmokezU
Yeah true my bad,sorry but isn't he a girl "luicy" what kind of guy has a girl name?
|
Er .... why the hell would anyone care about his/her gender
I don't get your point.
Re: BAN Command -
DJefferson - 09.03.2018
CMD:ban(playerid, params[])
{
new targetid, reason[128];
if(PlayerInfo[playerid][pAdmin] < 2)
{
return SendClientMessage(playerid, COLOR_IVORY, "You are not authorized to use this command.");
}
if(sscanf(params, "us[128]", targetid, reason))
{
return SendClientMessage(playerid, COLOR_IVORY, "USAGE: /ban [playerid] [reason]");
}
if(!IsPlayerConnected(targetid))
{
return SendClientMessage(playerid, COLOR_IVORY, "The player specified is disconnected.");
}
if(PlayerInfo[targetid][pAdmin] > PlayerInfo[playerid][pAdmin])
{
return SendClientMessage(playerid, COLOR_IVORY, "The player specified has a higher admin level than you. They cannot be banned.");
}
Log_Write("log_punishments", "%s (uid: %i) banned %s (uid: %i), reason: %s", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], reason);
SendClientMessageToAllEx(COLOR_IVORY, "AdmCmd: %s was banned by %s, reason: %s", GetPlayerRPName(targetid), GetPlayerRPName(playerid), reason);
BanPlayer(targetid, GetPlayerNameEx(playerid), reason);
return 1;
}