Why not working ?
#1

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	{
	if(PlayerData[playerid][Muted] == 1)
	{
	NMC(playerid,"[ NOTICE ] You are still muted !");
	return 0;
	}
	if(PlayerData[playerid][CmdDisabled] == 1)
	{
	NMC(playerid,"[ NOTICE ] Your commands are still disabled !");
	return 0;
	}
	if(PlayerData[playerid][Jailed] == 1)
	{
	if(PlayerData[playerid][Level] >= 4)
	{
	return 1;
	}
Guys why not working ? The script continues but I didnt post it all,I want it if a player is a jailed and a player is high level admin to still be able to have abillity while jailed to use commands,is this possible ?
Reply
#2

Make it return 1 instead of 0.
Reply
#3

Код:
if(PlayerData[playerid][Jailed] == 1)
	{
	if(PlayerData[playerid][Level] >= 4)
	{
	return 1; <========= Its already one but no working,neither if cmds are disabled and I did if(ServerData[CmdDisabledAll] == 1 && PlayerData[playerid][Level] >= 4) { return 1;} but still not working :/
	}
Reply
#4

This (
Код:
if(PlayerData[playerid][Muted] == 1)
	{
	NMC(playerid,"[ NOTICE ] You are still muted !");
	return 0;
	}
) needs to be under OnPlayerText
Reply
#5

Quote:
Originally Posted by Flo_White
This (
Код:
if(PlayerData[playerid][Muted] == 1)
	{
	NMC(playerid,"[ NOTICE ] You are still muted !");
	return 0;
	}
) needs to be under OnPlayerText Yes its also for commands You are not helping me
Reply
#6

pawn Код:
if(PlayerData[playerid][Level] < 4)
    {
    return 1;
    }
Changed >= to <.
Reply
#7

Also for the commands, for the second time. RETURN 1, NOT 0.
Reply
#8

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	{
	if(PlayerData[playerid][Muted] == 1)
	{
	NMC(playerid,"[ NOTICE ] You are still muted !");
	return 0;
	}
	if(PlayerData[playerid][CmdDisabled] == 1)
	{
	NMC(playerid,"[ NOTICE ] Your commands are still disabled !");
	return 0;
	}
	if(PlayerData[playerid][Jailed] == 1)
	{
	if(PlayerData[playerid][Level] >= 4)
	{
	return 1;
	}
	NMC(playerid,"[ NOTICE ] Commands are not allowed injail !");
	return 0;
	}
	if(ServerData[CmdDisabledAll] == 1)
	{
	if(PlayerData[playerid][Loggined] == 0)
	{
	return 1;
	}
	NMC(playerid,"[ NOTICE ] Server has disabled all commands !");
	return 0;
	}
	if(ServerData[ViewCmds] == 1)
	{
	new pname[MAX_PLAYER_NAME],string[100];
	GetPlayerName(playerid,pname,sizeof(pname));
	format(string,sizeof(string),"[ ViewCmd ] %s used the command %s",pname,cmdtext);
	ToAdmins45(string);
	}
	dcmd(register,8,cmdtext);
I changed it but still not working :/
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)