pawn Код:
public OnPlayerCommandText(playerid,cmdtext[])
{
dcmd(kick,4,cmdtext);
dcmd(ban,3,cmdtext);
return 0;
}
dcmd_kick(playerid,params[])
{
if(PlayerInfo[playerid][pAdminLevel] >= 1)
{
new tmp[256], tmp2[256], Index;
tmp = strtok(params,Index), tmp2 = strtok(params,Index);
if(!strlen(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /kick [playerid] [reason]");
new player1, PlayerName[MAX_PLAYER_NAME], string[128];
player1 = strval(tmp);
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID && player1 != playerid && PlayerInfo[player1][Admin] == 0)
{
GetPlayerName(player1, PlayerName, sizeof(PlayerName));
if(!strlen(tmp2))
{
format(string,sizeof(string),"***KICK (ADMIN) Player: %s",PlayerName);
SendClientMessageToAll(COLOUR_PINK,string);
print(string);
dUserSetINT(PlayerName2(playerid)).("Kicks",dUserINT(PlayerName2(playerid)).("Kicks")+1);
return Kick(player1);
}
else
{
format(string,sizeof(string),"***KICK (ADMIN) Player: %s Reason: %s ",PlayerName,params[2]);
SendClientMessageToAll(COLOUR_PINK,string);
print(string);
dUserSetINT(PlayerName2(playerid)).("Kicks",dUserINT(PlayerName2(playerid)).("Kicks")+1);
return Kick(player1);
}
} else return SendClientMessage(playerid, COLOUR_RED, "ERROR: Player is not connected, is an admin or is yourself");
}
return 1;
}
dcmd_ban(playerid,params[])
{
if(PlayerInfo[playerid][pAdminLevel] >= 1)
{
new ip[128], tmp[256], tmp2[256], Index;
tmp = strtok(params,Index), tmp2 = strtok(params,Index);
if(!strlen(params)) return SendClientMessage(playerid, COLOUR_WHITE, "USAGE: /ban [playerid] [reason]");
new player1, PlayerName[MAX_PLAYER_NAME], string[128];
player1 = strval(tmp);
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID && player1 != playerid && if(PlayerInfo[playerid][pAdminLevel] == 0)
{
GetPlayerName(player1, PlayerName, sizeof(PlayerName));
new year,month,day,hour,minuite,second;
getdate(year, month, day);
gettime(hour,minuite,second);
format(string,sizeof(string),"***BAN (ADMIN) Player: %s Reason: %s [Date: %d/%d/%d] [Time: %d:%d]",PlayerName,params[2],day,month,year,hour,minuite);
SendClientMessageToAll(COLOUR_PINK,string);
print(string);
if(dUserINT(PlayerName2(player1)).("Banned") == 0)
{
dUserSetINT(PlayerName2(player1)).("Banned",1);
}
GetPlayerIp(player1,ip,sizeof(ip));
strdel(ip,strlen(ip)-2,strlen(ip));
format(ip,128,"%s**",ip);
format(ip,128,"banip %s",ip);
SendRconCommand(ip);
return 1;
} else return SendClientMessage(playerid, COLOR_RED, "ERROR: Player is not connected, is an admin or is yourself");
}
return 1;
}
have you even attemped to get rid of these errors you could atleast define the colours try to fix the colours at least then ill take another look because it looks like youve copyed and pasted this into script and youve realsed this with out the scripters permission