2 Commands returning "SERVER: Unknown command"
#1

Now before we get started, the commands are returning 1.

I'm trying to make an invisible command (saw a discussuion on another topic a wile back that returning 0 under OnPlayerUpdate will desync you, basically making you invisible.) But when I try to enter the commands they return "SERVER: Unknown command."

Here's the codes..

Код:
dcmd_invisible(playerid, cmdtext[])
{
	#pragma unused cmdtext
	if(pInfo[playerid][Level] < 2) return SendClientMessage(playerid,COLOR_RED,"ERROR: You must be level 2 to become invisible");
	SetPlayerPos(playerid,0.00,0.00,0.00);
	Invisible[playerid] = 1;
	SendClientMessage(playerid,COLOR_LIGHTGREEN,"You are now invisible");
	return 1;
}

dcmd_invisibleoff(playerid, cmdtext[])
{
	#pragma unused cmdtext
	if(pInfo[playerid][Level] < 2) return SendClientMessage(playerid,COLOR_RED,"ERROR: You're not invisible!");
	if(Invisible[playerid] == 0) return SendClientMessage(playerid,COLOR_RED,"ERROR: You're not invisible!");
	Invisible[playerid] = 0;
	SendClientMessage(playerid,COLOR_LIGHTGREEN,"You are now visible!");
	return 1;
public OnPlayerUpdate(playerid)
{
	if(GetPlayerPing(playerid) >= 750)
	{
	[...]
	}
	if(GetPlayerWeapon(playerid) == 38)
	{
	[...]
	}
	if(Invisible[playerid])return 0;
	return 1;
}
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)