Line prevent admins doesnt work
#1

Hey guys, I've got this line for my script,

Код:
if( id == pInfo[playerid][Adminlevel] < 0 )
		return SendClientMessage(playerid, RED, "ERROR: You cannot ban another admin!");
And it doesnt work. Admins can still ban/kick/jail eachother
Reply
#2

Maybe change 0 to 1?
Reply
#3

This should work:
pawn Код:
if(pInfo[id][AdminLevel] >= 1) return SendClientMessage(playerid, RED, "You cannot use this command on admins.");
Reply
#4

Quote:
Originally Posted by JJB562
Посмотреть сообщение
This should work:
pawn Код:
if(pInfo[id][AdminLevel] >= 1) return SendClientMessage(playerid, RED, "You cannot use this command on admins.");
Код:
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\LOSSAN~1\GAMEMO~1\Testing.pwn(1189) : warning 213: tag mismatch
Reply
#5

Can't you stick to one topic? I gave you an answer in here: https://sampforum.blast.hk/showthread.php?tid=416849
Reply
#6

Post your RED define, please.
Reply
#7

Please help
Reply
#8

pawn Код:
if( id == pInfo[playerid][Adminlevel] > 0 )
        return SendClientMessage(playerid, 0xAA3333AA, "ERROR: You cannot ban another admin!");
Reply
#9

use this:
Quote:

if(PlayerInfo[playerid][pAdmin] < PlayerInfo[giveplayerid][pAdmin])
{
SendClientMessage(playerid,COLOR_GREY,"Nu poti bana un admin mai mare ca tine!");
return 1;
}

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)