CMD:kick(playerid, params[]) { if (PlayerInfo[playerid][pAdmin] >= 1) { new string[128], giveplayerid, reason[64]; if(sscanf(params, "us[64]", giveplayerid, reason)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /kick [playerid] [reason]"); if(IsPlayerConnected(giveplayerid)) { if(PlayerInfo[giveplayerid][pAdmin] >= PlayerInfo[playerid][pAdmin] && (PlayerInfo[giveplayerid][pHelper] >= 2 || PlayerInfo[giveplayerid][pAdmin] > 0) && playerid != giveplayerid) { format(string, sizeof(string), "ADMCMD: %s has been auto-kicked, reason: Trying to /kick a higher admin.", GetPlayerNameEx(playerid)); ABroadCast(COLOR_YELLOW,string, (PlayerInfo[playerid][pAdmin] == 1) ? (1) : (2)); Kick(playerid); return 1; } else { new year, month,day; getdate(year, month, day); new playerip[32]; GetPlayerIp(giveplayerid, playerip, sizeof(playerip)); format(string, sizeof(string), "ADMCMD: %s (IP:%s) has been kicked by %s, reason: %s (%d-%d-%d)", GetPlayerNameEx(giveplayerid), playerip, GetPlayerNameEx(playerid), reason,month,day,year); format(string, sizeof(string), "ADMCMD: %s has been kicked by %s, reason: %s", GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid), reason); SendClientMessageToAllEx(COLOR_LIGHTRED, string); Kick(playerid); } return 1; } } else SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!"); return 1; } CMD:skick(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] >= 1) { new string[128], giveplayerid, reason[64]; if(sscanf(params, "us[64]", giveplayerid, reason)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /skick [playerid/partofname] [reason]"); if(IsPlayerConnected(giveplayerid)) { if(PlayerInfo[giveplayerid][pAdmin] < PlayerInfo[playerid][pAdmin]) { new playerip[32]; GetPlayerIp(giveplayerid, playerip, sizeof(playerip)); format(string, sizeof(string), "AdmCmd: %s(IP:%s) was silent kicked by %s, reason: %s", GetPlayerNameEx(giveplayerid), playerip, GetPlayerNameEx(playerid), reason); Log("logs/kick.log", string); format(string, sizeof(string), "AdmCmd: %s was silent kicked by %s, reason: %s", GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid), reason); ABroadCast(COLOR_LIGHTRED,string,1); Kick(giveplayerid); } return 1; } else SendClientMessage(playerid, COLOR_GRAD1, "Invalid player specified."); } return 1; } CMD:ban(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] >= 2) { new string[128], giveplayerid, reason[64]; if(sscanf(params, "us[64]", giveplayerid, reason)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /ban [playerid/partofname] [reason]"); if(IsPlayerConnected(giveplayerid)) { if(PlayerInfo[giveplayerid][pAdmin] > PlayerInfo[playerid][pAdmin]) { if(AdminDuty[playerid] == 1) { new username[MAX_PLAYER_NAME]; GetPVarString(playerid, "TempNameName", username, sizeof(username)); SetPVarInt(playerid, "TempName", 0); SetPlayerName(playerid, username); } format(string, sizeof(string), "AdmCmd: %s has been auto-banned, reason: Trying to /ban a higher admin.", PlayerInfo[playerid][pAdminName]); ABroadCast(COLOR_YELLOW,string,1); PlayerInfo[playerid][pBanned] = 1; new ip[32]; GetPlayerIp(playerid,ip,sizeof(ip)); AddBan(ip); Kick(playerid); return 1; } else { new playerip[32]; GetPlayerIp(giveplayerid, playerip, sizeof(playerip)); if(AdminDuty[giveplayerid] == 1) { new username[MAX_PLAYER_NAME]; GetPVarString(giveplayerid, "TempNameName", username, sizeof(username)); SetPVarInt(giveplayerid, "TempName", 0); SetPlayerName(giveplayerid, username); format(string, sizeof(string), "AdmCmd: %s(IP:%s) was banned by %s, reason: %s", PlayerInfo[giveplayerid][pAdminName], playerip, GetPlayerNameEx(playerid), reason); Log("logs/ban.log", string); format(string, sizeof(string), "AdmCmd: %s was banned by %s, reason: %s", PlayerInfo[giveplayerid][pAdminName], GetPlayerNameEx(playerid), reason); } else { format(string, sizeof(string), "AdmCmd: %s(IP:%s) was banned by %s, reason: %s", GetPlayerNameEx(giveplayerid), playerip, GetPlayerNameEx(playerid), reason); Log("logs/ban.log", string); format(string, sizeof(string), "AdmCmd: %s was banned by %s, reason: %s", GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid), reason); } SendClientMessageToAllEx(COLOR_LIGHTRED, string); PlayerInfo[giveplayerid][pBanned] = 1; new ip[32]; GetPlayerIp(giveplayerid,ip,sizeof(ip)); AddBan(ip); Kick(giveplayerid); return 1; } } else SendClientMessage(playerid, COLOR_GRAD1, "Invalid player specified."); } return 1; }
CMD:kick(playerid, params[])
{
if (PlayerInfo[playerid][pAdmin] >= 1)
{
new string[128], giveplayerid, reason[64];
if(sscanf(params, "us[64]", giveplayerid, reason)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /kick [playerid] [reason]");
if(IsPlayerConnected(giveplayerid))
{
if(PlayerInfo[giveplayerid][pAdmin] >= PlayerInfo[playerid][pAdmin] && (PlayerInfo[giveplayerid][pHelper] >= 2 || PlayerInfo[giveplayerid][pAdmin] > 0) && playerid != giveplayerid)
{
format(string, sizeof(string), "ADMCMD: %s has been auto-kicked, reason: Trying to /kick a higher admin.", GetPlayerNameEx(playerid));
ABroadCast(COLOR_YELLOW,string, (PlayerInfo[playerid][pAdmin] == 1) ? (1) : (2));
SetTimerEx("KickPlayer", 500, false "i", playerid);
return 1;
}
else
{
new year, month,day;
getdate(year, month, day);
new playerip[32];
GetPlayerIp(giveplayerid, playerip, sizeof(playerip));
format(string, sizeof(string), "ADMCMD: %s (IP:%s) has been kicked by %s, reason: %s (%d-%d-%d)", GetPlayerNameEx(giveplayerid), playerip, GetPlayerNameEx(playerid), reason,month,day,year);
format(string, sizeof(string), "ADMCMD: %s has been kicked by %s, reason: %s", GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid), reason);
SendClientMessageToAllEx(COLOR_LIGHTRED, string);
SetTimerEx("KickPlayer", 500, false "i", playerid);
}
return 1;
}
}
else SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
return 1;
}
CMD:skick(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
new string[128], giveplayerid, reason[64];
if(sscanf(params, "us[64]", giveplayerid, reason)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /skick [playerid/partofname] [reason]");
if(IsPlayerConnected(giveplayerid))
{
if(PlayerInfo[giveplayerid][pAdmin] < PlayerInfo[playerid][pAdmin]) {
new playerip[32];
GetPlayerIp(giveplayerid, playerip, sizeof(playerip));
format(string, sizeof(string), "AdmCmd: %s(IP:%s) was silent kicked by %s, reason: %s", GetPlayerNameEx(giveplayerid), playerip, GetPlayerNameEx(playerid), reason);
Log("logs/kick.log", string);
format(string, sizeof(string), "AdmCmd: %s was silent kicked by %s, reason: %s", GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid), reason);
ABroadCast(COLOR_LIGHTRED,string,1);
SetTimerEx("KickPlayer", 500, false "i", giveplayerid);
}
return 1;
} else SendClientMessage(playerid, COLOR_GRAD1, "Invalid player specified.");
}
return 1;
}
CMD:ban(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 2)
{
new string[128], giveplayerid, reason[64];
if(sscanf(params, "us[64]", giveplayerid, reason)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /ban [playerid/partofname] [reason]");
if(IsPlayerConnected(giveplayerid))
{
if(PlayerInfo[giveplayerid][pAdmin] > PlayerInfo[playerid][pAdmin])
{
if(AdminDuty[playerid] == 1)
{
new username[MAX_PLAYER_NAME];
GetPVarString(playerid, "TempNameName", username, sizeof(username));
SetPVarInt(playerid, "TempName", 0);
SetPlayerName(playerid, username);
}
format(string, sizeof(string), "AdmCmd: %s has been auto-banned, reason: Trying to /ban a higher admin.", PlayerInfo[playerid][pAdminName]);
ABroadCast(COLOR_YELLOW,string,1);
PlayerInfo[playerid][pBanned] = 1;
new ip[32];
GetPlayerIp(playerid,ip,sizeof(ip));
AddBan(ip);
SetTimerEx("KickPlayer", 500, false "i", playerid);
return 1;
}
else
{
new playerip[32];
GetPlayerIp(giveplayerid, playerip, sizeof(playerip));
if(AdminDuty[giveplayerid] == 1)
{
new username[MAX_PLAYER_NAME];
GetPVarString(giveplayerid, "TempNameName", username, sizeof(username));
SetPVarInt(giveplayerid, "TempName", 0);
SetPlayerName(giveplayerid, username);
format(string, sizeof(string), "AdmCmd: %s(IP:%s) was banned by %s, reason: %s", PlayerInfo[giveplayerid][pAdminName], playerip, GetPlayerNameEx(playerid), reason);
Log("logs/ban.log", string);
format(string, sizeof(string), "AdmCmd: %s was banned by %s, reason: %s", PlayerInfo[giveplayerid][pAdminName], GetPlayerNameEx(playerid), reason);
}
else
{
format(string, sizeof(string), "AdmCmd: %s(IP:%s) was banned by %s, reason: %s", GetPlayerNameEx(giveplayerid), playerip, GetPlayerNameEx(playerid), reason);
Log("logs/ban.log", string);
format(string, sizeof(string), "AdmCmd: %s was banned by %s, reason: %s", GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid), reason);
}
SendClientMessageToAllEx(COLOR_LIGHTRED, string);
PlayerInfo[giveplayerid][pBanned] = 1;
new ip[32];
GetPlayerIp(giveplayerid,ip,sizeof(ip));
AddBan(ip);
SetTimerEx("KickPlayer", 500, false "i", giveplayerid);
return 1;
}
} else SendClientMessage(playerid, COLOR_GRAD1, "Invalid player specified.");
}
return 1;
}
forward KickPlayer(playerid);
public KickPlayer(playerid)
{
Kick(playerid);
}
use a timer
if you need to give the code you should pay just one REP |
Really Thanks For Answer My Question
Any Way We Need Good Scripters PHP код:
|
C:\Users\Cris\Desktop\0.3z Server\ASRP (LRP script)\gamemodes\ASRP_V2.0.pwn(34152) : error 001: expected token: ",", but found "-string-" C:\Users\Cris\Desktop\0.3z Server\ASRP (LRP script)\gamemodes\ASRP_V2.0.pwn(34152) : warning 215: expression has no effect C:\Users\Cris\Desktop\0.3z Server\ASRP (LRP script)\gamemodes\ASRP_V2.0.pwn(34152) : warning 215: expression has no effect C:\Users\Cris\Desktop\0.3z Server\ASRP (LRP script)\gamemodes\ASRP_V2.0.pwn(34152) : error 001: expected token: ";", but found ")" C:\Users\Cris\Desktop\0.3z Server\ASRP (LRP script)\gamemodes\ASRP_V2.0.pwn(34152) : error 029: invalid expression, assumed zero C:\Users\Cris\Desktop\0.3z Server\ASRP (LRP script)\gamemodes\ASRP_V2.0.pwn(34152) : fatal error 107: too many error messages on one line
Line 34152: SetTimerEx("KickPlayer", 500, false "i", playerid);