sokol10rus
Дебютант
я думаю каждый встречал на любом Role Play сервере кики не по рп!?
тогда я предлагаю вам такую систему!
причины можно изменять и добавлять самому!)
делается всё легко думаю кому нибудь помог!
тогда я предлагаю вам такую систему!
PHP:
в public OnPlayerCommandText(playerid, cmdtext[])
if(strcmp(cmd, "/kick", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GREY, "GoldenCity[RP]: /kick [playerid/PartOfName] [reason 1-5]");
SendClientMessage(playerid, COLOR_LIGHTRED, "Причины кика:");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "1 - читы(собейт/клео)");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "2 - nonRP nick смени на RP (Имя_Фамилия)");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "3 - Нон рп повидение");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "4 - offtop");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "5 -нарушение правил сервера ");
return 1;
}
giveplayerid = ReturnUser(tmp);
new reasonkick;
tmp = strtok(cmdtext, idx);
reasonkick = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if (GainAdmin[giveplayerid] == 1)
{
SendClientMessage(playerid, COLOR_GREY, "GoldenCity[RP]: Невозможное действие.");
return 1;
}
if(reasonkick == 1)
{
format(string, sizeof(string), "GoldenCity[RP]: %s был кикнут(-а) администратором %s, причина: читы(собейт/клео).", giveplayer, sendername);
SendClientMessageToAll(COLOR_LIGHTRED, string);
Kick(giveplayerid);
}
else if(reasonkick == 2)
{
format(string, sizeof(string), "GoldenCity[RP]: %s кикнут(-а) администратором %s, причина: nonRP nick смени на RP (Имя_Фамилия)", giveplayer, sendername);
SendClientMessageToAll(COLOR_LIGHTRED, string);
Kick(giveplayerid);
}
else if(reasonkick == 3)
{
format(string, sizeof(string), "GoldenCity[RP]: %s был кикнут(-а) администратором %s, причина: Нон рп повидение.", giveplayer, sendername);
SendClientMessageToAll(COLOR_LIGHTRED, string);
Kick(giveplayerid);
}
else if(reasonkick == 4)
{
format(string, sizeof(string), "GoldenCity[RP]: %s был кикнут(-а) администратором %s, причина: offtop.", giveplayer, sendername);
SendClientMessageToAll(COLOR_LIGHTRED, string);
Kick(giveplayerid);
}
else if(reasonkick == 5)
{
format(string, sizeof(string), "GoldenCity[RP]: %s был кикнут(-а) администратором %s нарушение правил сервера.", giveplayer, sendername);
SendClientMessageToAll(COLOR_LIGHTRED, string);
Kick(giveplayerid);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "GoldenCity[RP]: /kick [playerid/PartOfName] [reason 1-5]");
SendClientMessage(playerid, COLOR_LIGHTRED, "Причины кика:");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "1 - Читы (собейт/клео)");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "2 - nonRP nick смени на RP (Имя_Фамилия)");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "3 - Нон рп повидение");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "4 - offtop");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "5 - нарушение правил сервера");
}
}
}
}
else
{
format(string, sizeof(string), "Недостаточно прав для использования команды.");
SendClientMessage(playerid, COLOR_GREY, string);
}
}
}
делается всё легко думаю кому нибудь помог!
Последнее редактирование:
