SA-MP Forums Archive
Public ------> Rcon admins only. - 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)
+--- Thread: Public ------> Rcon admins only. (/showthread.php?tid=427162)



Public ------> Rcon admins only. - AwesomeBi3cute - 31.03.2013

Hello everybody.Can you guys help me a bit? How to turn this /fly command only for rcon admins?

Код:
#include <a_samp>
#include <fly>

public OnFilterScriptInit()
{
	print("=========================================\n");
	print("SuperMan for SuperNatural People GM");
	print(" ");
	print("=========================================\n");
	return 1;
}
public OnPlayerConnect(playerid)
{
	InitFly(playerid);
	return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
	if(!IsPlayerAdmin(cmdtext,"/fly",true))
	{
	    StartFly(playerid);
	    return 1;
	}
	if(!strcmp(cmdtext,"/stopfly",true))
	{
	    StopFly(playerid);
	    return 1;
	}
	return 0;
}



Re: Public ------> Rcon admins only. - SilverKiller - 31.03.2013

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext,"/fly",true))
    {
        if(!IsPlayerAdmin(playerid)) SendClientMessage(playerid, -1, "You need to be a RCON admin to use this command!");
        else
        {
            StartFly(playerid);
        }
        return 1;
    }
    if(!strcmp(cmdtext,"/stopfly",true))
    {
        if(!IsPlayerAdmin(playerid)) SendClientMessage(playerid, -1, "You need to be a RCON admin to use this command!");
        else
        {
            StopFly(playerid);
        }
        return 1;
    }
    return 0;
}



Re: Public ------> Rcon admins only. - shady001 - 31.03.2013

Код:
#include <a_samp>
#include <fly>

public OnFilterScriptInit()
{
	print("=========================================\n");
	print("SuperMan for SuperNatural People GM");
	print(" ");
	print("=========================================\n");
	return 1;
}
public OnPlayerConnect(playerid)
{
	InitFly(playerid);
	return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
	if(strcmp(cmdtext,"/fly",true) == 0)
	{
               if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_WHITE,"You need to be an admin to use this!");
	    StartFly(playerid);
	    return 1;
	}
	if(strcmp(cmdtext,"/stopfly",true) == 0)
	{
	    StopFly(playerid);
	    return 1;
	}
	return 0;
}
EDIT : Too late :P


Re: Public ------> Rcon admins only. - AwesomeBi3cute - 31.03.2013

Quote:
Originally Posted by SilverKiller
Посмотреть сообщение
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext,"/fly",true))
    {
        if(!IsPlayerAdmin(playerid)) SendClientMessage(playerid, -1, "You need to be a RCON admin to use this command!");
        else
        {
            StartFly(playerid);
        }
        return 1;
    }
    if(!strcmp(cmdtext,"/stopfly",true))
    {
        if(!IsPlayerAdmin(playerid)) SendClientMessage(playerid, -1, "You need to be a RCON admin to use this command!");
        else
        {
            StopFly(playerid);
        }
        return 1;
    }
    return 0;
}
Now i have this prob :

Код:
C:\Users\KryptoniteX\Desktop\gtasa\pawno\fly.pwn(2) : fatal error 100: cannot read from file: "fly"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.



Re: Public ------> Rcon admins only. - SilverKiller - 31.03.2013

Open the file from pawno.exe not by clicking on it.


Re: Public ------> Rcon admins only. - AwesomeBi3cute - 31.03.2013

Quote:
Originally Posted by shady001
Посмотреть сообщение
Код:
#include <a_samp>
#include <fly>

public OnFilterScriptInit()
{
	print("=========================================\n");
	print("SuperMan for SuperNatural People GM");
	print(" ");
	print("=========================================\n");
	return 1;
}
public OnPlayerConnect(playerid)
{
	InitFly(playerid);
	return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
	if(strcmp(cmdtext,"/fly",true) == 0)
	{
               if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_WHITE,"You need to be an admin to use this!");
	    StartFly(playerid);
	    return 1;
	}
	if(strcmp(cmdtext,"/stopfly",true) == 0)
	{
	    StopFly(playerid);
	    return 1;
	}
	return 0;
}
EDIT : Too late :P
What you mean?


Re: Public ------> Rcon admins only. - AwesomeBi3cute - 31.03.2013

Quote:
Originally Posted by SilverKiller
Посмотреть сообщение
Open the file from pawno.exe not by clicking on it.
I open pawno.exe with admin rights and then the fly.pwn file.


Re: Public ------> Rcon admins only. - shady001 - 31.03.2013

i mean that SilverKiller post the answer before me .

EDIT : about fly ... you need to have fly.inc in your pawno/include folder


Re: Public ------> Rcon admins only. - AwesomeBi3cute - 31.03.2013

Quote:
Originally Posted by shady001
Посмотреть сообщение
i mean that SilverKiller post the answer before me .
Oh))

EDIT: so anybody knows what it can be?

Код:
C:\Users\KryptoniteX\Desktop\gtasa\pawno\fly.pwn(2) : fatal error 100: cannot read from file: "fly"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.



Re: Public ------> Rcon admins only. - AwesomeBi3cute - 31.03.2013

Quote:
Originally Posted by shady001
Посмотреть сообщение
i mean that SilverKiller post the answer before me .

EDIT : about fly ... you need to have fly.inc in your pawno/include folder
Oh you helped a lot thanks! i was keeping the fly.inc at pawno with fly.pwn xD