[HELP]How To Make A Remove Warning Command? -
GAMER_PS2 - 06.10.2011
Can Anyone Tell Me How TO Make A /remwarn cmd that Remove A Waring Of A player
Help me PLZ
Re: [HELP]How To Make A Remove Warning Command? -
zombieking - 06.10.2011
Well what is your Warnings variable?
Re: [HELP]How To Make A Remove Warning Command? -
Pharrel - 06.10.2011
do the same as the command that add warn and find the variable[playeriid]++; or variable[playerid]+=1; and replace to variable[playerid]--;
Re: [HELP]How To Make A Remove Warning Command? -
GAMER_PS2 - 06.10.2011
I need Help In LuxAdmin can u give me that code Plz
Re: [HELP]How To Make A Remove Warning Command? -
GAMER_PS2 - 06.10.2011
Код:
dcmd_warn(playerid,params[])
{
if(AccInfo[playerid][Level] >= 2 || AccInfo[playerid][pVip] > 3)
{
new Index;
new tmp[256]; tmp = strtok(params,Index);
new tmp2[256]; tmp2 = strtok(params,Index);
if(!strlen(tmp) || !strlen(tmp2)) return
SendClientMessage(playerid, LIGHTBLUE2, "Usage: /warn [PlayerID] [Reason]") &&
SendClientMessage(playerid, orange, "Function: Will give a Warning in specified player");
new warned = strval(tmp);
new str[128];
if(AccInfo[warned][Level] == ServerInfo[MaxAdminLevel] && AccInfo[playerid][Level] != ServerInfo[MaxAdminLevel])
return SendClientMessage(playerid,red,"ERROR: You cannot use this command on this admin");
if(IsPlayerConnected(warned) && warned != INVALID_PLAYER_ID)
{
if(warned != playerid)
{
SendCommandToAdmins(playerid,"Warn");
AccInfo[warned][Warnings]++;
if( AccInfo[warned][Warnings] == MAX_WARNINGS)
{
format(str, sizeof (str), "***Administrator \"%s\" has kicked \"%s\". [Reason]: %s (Warnings: %d/%d).", pName(playerid), pName(warned), params[1+strlen(tmp)], AccInfo[warned][Warnings], MAX_WARNINGS);
SendClientMessageToAll(lightred, str);
SaveIn("KickLog",str);
Kick(warned);
return AccInfo[warned][Warnings] = 0;
}
else
{
format(str, sizeof (str), "***Administrator \"%s\" has given \"%s\" a Warning.[Reason]: %s (Warnings: %d/%d).", pName(playerid), pName(warned), params[1+strlen(tmp)], AccInfo[warned][Warnings], MAX_WARNINGS);
return SendClientMessageToAll(yellow, str);
}
}
else return SendClientMessage(playerid, red, "ERROR: You cannot warn yourself");
}
else return ErrorMessages(playerid, 2);
}
else return ErrorMessages(playerid, 1);
}
heres the code of warn cmd in LuxAdmin
Re: [HELP]How To Make A Remove Warning Command? -
IstuntmanI - 06.10.2011
Use
Код:
AccInfo[ playerid ][ Warnings ] = 0;
You can do the rest.
Re: [HELP]How To Make A Remove Warning Command? -
GAMER_PS2 - 06.10.2011
where should put it costel??
Re: [HELP]How To Make A Remove Warning Command? -
=WoR=G4M3Ov3r - 06.10.2011
Quote:
Originally Posted by GAMER_PS2
where should put it costel??
|
make a new cmd, using what costel gave you.
Re: [HELP]How To Make A Remove Warning Command? -
GAMER_PS2 - 06.10.2011
dude i am not that much good in scripting -.-
Re: [HELP]How To Make A Remove Warning Command? -
brett7 - 06.10.2011
Untested, but you get the idea.
pawn Код:
dcmd_clearwarn(playerid,params[])
{
if(AccInfo[playerid][Level] >= 2 || AccInfo[playerid][pVip] > 3)
{
new Index;
new tmp[256]; tmp = strtok(params,Index);
if(!strlen(tmp) return
SendClientMessage(playerid, LIGHTBLUE2, "Usage: /clearwarn [PlayerID]") &&
SendClientMessage(playerid, orange, "Function: Will clear all Warnings for a specified player");
new warned = strval(tmp);
new str[128];
if(AccInfo[warned][Level] == ServerInfo[MaxAdminLevel] && AccInfo[playerid][Level] != ServerInfo[MaxAdminLevel])
return SendClientMessage(playerid,red,"ERROR: You cannot use this command on this admin");
if(IsPlayerConnected(warned) && warned != INVALID_PLAYER_ID)
{
format(str, sizeof (str), "***Administrator \"%s\" has cleared\"%s\" Warnings", pName(playerid), pName(warned));
AccInfo[ warned][ Warnings ] = 0;
return SendClientMessageToAll(yellow, str);
}
else return SendClientMessage(playerid, red, "ERROR: You cannot warn yourself");
}
else return ErrorMessages(playerid, 2);
}
else return ErrorMessages(playerid, 1);
}