Public ------> Rcon admins only.
#1

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;
}
Reply
#2

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;
}
Reply
#3

Код:
#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
Reply
#4

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.
Reply
#5

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

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?
Reply
#7

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.
Reply
#8

i mean that SilverKiller post the answer before me .

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

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.
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)