What have i done wrong?
#4

Now i have a new problem. This is how the script looks like now.
Код:
#include <a_samp>
#include <fly>

new adminfly;
public OnFilterScriptInit()
{
	print("=========================================\n");
	print("Fly include demo FS by Norck");
	print(" ");
	print("=========================================\n");
	return 1;
}
public OnGameModeInit()
{
	adminfly = 1;
	return 1;
}
public OnPlayerConnect(playerid)
{
	InitFly(playerid);
	return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
	if(!strcmp(cmdtext,"/enablefly",true))
	{
	    if(IsPlayerAdmin(playerid))
		{
			adminfly = 2;
  			return 1;
		}
	}
	if(!strcmp(cmdtext,"/disablefly",true))
	{
	    adminfly = 1;
	    return 1;
	}
	if(!strcmp(cmdtext,"/fly",true))
	{
	    if (adminfly == 2)
	    {
			StartFly(playerid);
			return 1;
		}
  		else SendClientMessage(playerid, 0xFFFFFFAA, "ERROR: You have to ask a owner to enable /fly!");
		return 1;
	}
	if(!strcmp(cmdtext,"/stopfly",true))
	{
	    StopFly(playerid);
	    return 1;
	}
	return 0;
}
When i go ingame and type "/enablefly" then i get a unknow command message back whats wrong?
Reply


Messages In This Thread
What have i done wrong? - by Frede - 05.12.2012, 17:51
Re: What have i done wrong? - by Mr.Anonymous - 05.12.2012, 17:54
Re: What have i done wrong? - by Frede - 05.12.2012, 17:56
Re: What have i done wrong? - by Frede - 05.12.2012, 18:11
Re: What have i done wrong? - by Mr.Anonymous - 05.12.2012, 18:39
Re: What have i done wrong? - by Frede - 05.12.2012, 18:42

Forum Jump:


Users browsing this thread: 3 Guest(s)