warn scritp needed
#1

can any on turn this in to a warn script and after 5 warnings it bans them

Код:
 	if(strcmp(cmd, "/setadmin", true) == 0 || strcmp(cmd, "/makeadmin", true) == 0)
	{
        new player[MAX_PLAYER_NAME];
        if(PlayerInfo[playerid][Admin] < 7) return SendClientMessage(playerid, RED, "You Have To Be A Level 7 Admin To Use This!");
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setadmin or /makeadmin [playerid] [AdminLevel]");
		giveplayerid = ReturnUser(tmp);
        tmp = strtok(cmdtext, idx);
        new level = strval(tmp);
       	if(giveplayerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_WHITE, "Invalid Player ID.");
       	GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
        GetPlayerName(playerid, player, sizeof(player));
        PlayerInfo[giveplayerid][Admin] = level;
        printf("Admin %s made %s a level %d admin.", player, giveplayer, level);
        format(string, sizeof(string), "Admin \"%s\" has set your Admin Level to %d.",player, level);
        SendClientMessage(giveplayerid, COLOR_GREEN, string);
        format(string, sizeof(string), "You have given \"%s\" level %d admin.", giveplayer, PlayerInfo[giveplayerid][Admin]);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
       	return 1;
	}
Reply
#2

Make a Variable, e.g.

new PlayerVar_Warnings[MAX_PLAYERS];

On connect and Disconnect, set it to 0.

Make a command, which increases the Warnings of the Targeted player
if They are e.g. 5 or whatever, kick the player

Done
Reply
#3

thanks but i got one now and i think it works so thanks for your time
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)