Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onCommand(pid, command, params)
- {
- switch(command)
- {
- case "кик":
- CMD_KICK(pid, params);
- break;
- default:
- sendMessage(pid, 225, 225, 255, SERVER + "Произошла ошибка. Вы ввели не существующую команду");
- }
- }
- function CMD_KICK(pid, params)
- {
- local args = sscanf("ds", params);
- print("PARAMS: " + params);
- print("args[0] = " + args[0]);
- print("args[1] = " + args[1]);
- if(params != "NULL" || (args[0] != "NULL") && (args[1] != "NULL"))
- if(Player[pid].isAdmin == 1)
- {
- if(isPlayerConnected(args[0]))
- {
- for(local i = 0; i <= getMaxSlots(); ++i)
- if(isPlayerConnected(i))
- sendMessage(i, 180, 4, 4, SERVER + "Игрок " + getPlayerName(args[0]) + " был кикнут администратором " + getPlayerName(pid) + ". Причина: " + args[1] + ".");
- }
- else
- sendMessage(pid, 225, 225, 225, SERVER + "Произошла ошибка. Игрок с таким ID не в игре.");
- }
- else
- sendMessage(pid, 225, 225, 225, SERVER + "Произошла ошибка. Вы не администратор.");
- else
- sendMessage(pid, 225, 225, 225, SERVER + "Используйте: /кик (id) (причина).");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement