Some help please :) :p
#1

Quote:

CMDetlevel(playerid, params[])
{
new string[SOS];
new toplayerid, level;
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, RED, "ERROR: You Aren't High Level Enough To Use This Command");
if(sscanf(params, "ui", toplayerid, level)) return SendClientMessage(playerid, RED, "ERROR: /setlevel [ID] [Level]");
if(!IsPlayerConnected(toplayerid)) return SendClientMessage(playerid, RED, "ERROR: The player is not connected");
if(level < 0 || level > 7) return SendClientMessage(playerid, RED, "ERROR: The level must be beetwen 0 & 7");
format(string, SOS, "***%s has been set as administator level %i", pInfo[toplayerid][Name], level);
SendClientMessage(playerid, GREEN, string);
format(string, SOS, "You have been set as administrator level %i by %s", level, pInfo[playerid][Name]);
SendClientMessage(toplayerid, GREEN, string);
pInfo[playerid][Admin]=level;
return 1;
}

i want to add pInfo[playerid][Admin]>5 at the same line of IsPlayerAdmin
Reply
#2

Код:
If(!IsPlayerAdmin(playerid) || pInfo[playerid][Admin] > 5)
This will check if player is RCON admin OR An admin higher than level 5.
Reply
#3

gonna checking it
Reply
#4

what? does this produce error? it should not, but if it does can you show me what you added and how?
Reply
#5

Not working saying you aren't high level admin in game
Reply
#6

So you must not be Higher than level 5.
Reply
#7

PHP код:
If(!IsPlayerAdmin(playerid) || pInfo[playerid][Admin] < 5
Try this. This will check if the player is RCON logged in or will check if the player is level 5 or more.
Reply
#8

Nvm internet lag double posted.
Reply
#9

Quote:
Originally Posted by Karan007
Посмотреть сообщение
PHP код:
If(!IsPlayerAdmin(playerid) || pInfo[playerid][Admin] < 5
Try this. This will check if the player is RCON logged in or will check if the player is level 5 or more.
If you dont know what you're doing :/ better don't help lol. M8 your code will check if the player is econ or an admin LESS THAN LEVEL 5! He asked for the code of more than level 5 which I already gave but I don't know what he is doing which is causing issues. You claimed that it will check if player is level 5 or more. For that the code should be. pInfo[playerid][Admin] >= 5.
Reply
#10

Quote:
Originally Posted by [ND]xXZeusXx.
Посмотреть сообщение
If you dont know what you're doing :/ better don't help lol. M8 your code will check if the player is econ or an admin LESS THAN LEVEL 5! He asked for the code of more than level 5 which I already gave but I don't know what he is doing which is causing issues.
Well, i know what i'm doing. The full code is below.

PHP код:
If(!IsPlayerAdmin(playerid) || pInfo[playerid][Admin] < 5) return SendClientMessage(playeridRED"ERROR: You Aren't High Level Enough To Use This Command"); 
Well this will check if the player is not RCON admin or if he is less than level 5 then it'll return the following message!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)