12.10.2013, 05:51
guys pls help how we can add a admin (player) to be online all time and whene player come he say :hello "his name"
and he banned hackers pls help
and he banned hackers pls help
public OnPlayerSpawn(playerid)
{
if(IsPlayerAdmin(playerid)) SendClientMessageToAll(0xDEEE20FF, "Adminstrator has joined server welcome!");
return 1; //this will work if you are the rcon admin only , not for rest of admins change to your enum data
}
CMD:kick(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,"{FF0000}[ERROR]:{FAF5F5}You are not{FF0000} Administrator {FAF5F5}to use this command");
new id, reason[128];
else if(sscanf(params, "us", id, reason))SendClientMessage(playerid, -1, "{FF0000}[SYSTEM USAGE]:{FAF5F5}/kick [playerid][reason]");
else if (id==INVALID_PLAYER_ID)SendClientMessage(playerid,-1,"{FF0000}[ERROR]:{FAF5F5}Player is not connected!");
else {
new Name[MAX_PLAYER_NAME], KickMessage[128];
new Name2[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, sizeof(Name));
GetPlayerName(id, Name2, sizeof(Name2));
format(KickMessage, sizeof(KickMessage), "{FF0000}[Kick]:{FAF5F5}Adminstrator %s has kicked %s from server | reason : {FF0000}%s", Name, Name2,reason);
SendClientMessageToAll(-1, KickMessage);
new string[128];
format(string, sizeof(string), "You have been kicked from the server by adminstrator %s | REASON: %s", Name, Name2,reason);
ShowPlayerDialog(id,132342,DIALOG_STYLE_MSGBOX,"Kicked!",string,"ok","");
Kick(id);
}
return 1;
}