ban script
#1

hi i need a ban cmd please
Reply
#2

dcmd or normal command ?
Reply
#3

normal please
Reply
#4

Код:
if(strcmp("/ban", cmd, true) == 0)
		{
				tmp = strtok(cmdtext, idx);
                if(strval(tmp) == playerid) return SendClientMessage(playerid, red, "ERROR: You can't ban yourself!");
                if(IsPlayerConnected(strval(tmp)) == 0) return SendClientMessage(playerid, red, "ERROR: No player with such id!");
                cmdid = strval(tmp);

                format(string, sizeof(string), "NOTICE: %s have banned %s from the server.", prname, idname);
                SendClientMessageToAll(yellow, string);
                print(string);

                Ban(cmdid);
                return 1;

		}
dunno if it works.
Reply
#5

Quote:
Originally Posted by !Pumpkin
Посмотреть сообщение
Код:
if(strcmp("/ban", cmd, true) == 0)
		{
				tmp = strtok(cmdtext, idx);
                if(strval(tmp) == playerid) return SendClientMessage(playerid, red, "ERROR: You can't ban yourself!");
                if(IsPlayerConnected(strval(tmp)) == 0) return SendClientMessage(playerid, red, "ERROR: No player with such id!");
                cmdid = strval(tmp);

                format(string, sizeof(string), "NOTICE: %s have banned %s from the server.", prname, idname);
                SendClientMessageToAll(yellow, string);
                print(string);

                Ban(cmdid);
                return 1;

		}
dunno if it works.
You ought to make to so only RCON administrators can use that command...
Reply
#6

ok thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)