SA-MP Forums Archive
Why not working ? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Why not working ? (/showthread.php?tid=96862)



Why not working ? - The_Tough - 11.09.2009

Код:
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 ?



Re: Why not working ? - Calgon - 11.09.2009

Make it return 1 instead of 0.


Re: Why not working ? - The_Tough - 11.09.2009

Код:
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 :/
	}



Re: Why not working ? - Flo_White - 11.09.2009

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


Re: Why not working ? - The_Tough - 11.09.2009

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



Re: Why not working ? - MadeMan - 11.09.2009

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


Re: Why not working ? - Calgon - 11.09.2009

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


Re: Why not working ? - The_Tough - 11.09.2009

Код:
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 :/