"PlayerInfo" (FS)
#1

I created FS, and i compile then :
Код:
C:\Documents and Settings\Owner\Desktop\SA-MP\EMMR\anarchy.pwn(20) : error 017: undefined symbol "PlayerInfo"
C:\Documents and Settings\Owner\Desktop\SA-MP\EMMR\anarchy.pwn(20) : warning 215: expression has no effect
C:\Documents and Settings\Owner\Desktop\SA-MP\EMMR\anarchy.pwn(20) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Owner\Desktop\SA-MP\EMMR\anarchy.pwn(20) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Owner\Desktop\SA-MP\EMMR\anarchy.pwn(20) : fatal error 107: too many error messages on one line

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


4 Errors.
FS code:
Код:
#include <a_samp>

new anarchy;

public OnGameModeInit()
{
	SetGameModeText("EMMR + FilterScript = Anarchy");
	//Createobject
	CreateObject(987, 964.838013, -1439.087036, 12.550484, 0.0000, 0.0000, 270.0000);
	CreateObject(987, 964.898743, -1443.841553, 12.564914, 0.0000, 0.0000, 270.0000);
	//Vдrav
	anarchy = CreateObject(980, 1041.197998, -1460.007813, 15.411911, 0.0000, 0.0000, 270.0000);
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	if(strcmp(cmdtext,"/opena", true) == 0)
  	{
		if (PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)
		{
			MoveObject(anarchy, 1041.197998, -1460.007813, 9.786997,2.00);
     	return 1;
		}
		else
		{
			SendClientMessage(playerid, COLOR_RED, "  Sa pole maffiast Anarchy !");
		}
	}
	if(strcmp(cmdtext,"/closea", true) == 0)
  	{
		if (PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)
		{
			MoveObject(anarchy, 1041.197998, -1460.007813, 15.411911, 2.00);
     	return 1;
		}
		else
		{
			SendClientMessage(playerid, COLOR_RED, "  Sa pole maffiast Anarchy !");
		}
	}
}
Reply
#2

Quote:
Originally Posted by Matuu
Код:
#include <a_samp>

enum pInfo
{
	pMember,
	pLeader,
};
new PlayerInfo[MAX_PLAYERS][pInfo];

new anarchy;

public OnGameModeInit()
{
	SetGameModeText("EMMR + FilterScript = Anarchy");
	//Createobject
	CreateObject(987, 964.838013, -1439.087036, 12.550484, 0.0000, 0.0000, 270.0000);
	CreateObject(987, 964.898743, -1443.841553, 12.564914, 0.0000, 0.0000, 270.0000);
	//Vдrav
	anarchy = CreateObject(980, 1041.197998, -1460.007813, 15.411911, 0.0000, 0.0000, 270.0000);
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	if(strcmp(cmdtext,"/opena", true) == 0)
 	{
		if (PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)
		{
			MoveObject(anarchy, 1041.197998, -1460.007813, 9.786997,2.00);
    	return 1;
		}
		else
		{
			SendClientMessage(playerid, COLOR_RED, " Sa pole maffiast Anarchy !");
		}
	}
	if(strcmp(cmdtext,"/closea", true) == 0)
 	{
		if (PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)
		{
			MoveObject(anarchy, 1041.197998, -1460.007813, 15.411911, 2.00);
    	return 1;
		}
		else
		{
			SendClientMessage(playerid, COLOR_RED, " Sa pole maffiast Anarchy !");
		}
	}
}
Reply
#3

Код:
C:\Documents and Settings\Owner\Desktop\SA-MP\EMMR\anarchy.pwn(34) : error 017: undefined symbol "COLOR_RED"
C:\Documents and Settings\Owner\Desktop\SA-MP\EMMR\anarchy.pwn(46) : error 017: undefined symbol "COLOR_RED"
C:\Documents and Settings\Owner\Desktop\SA-MP\EMMR\anarchy.pwn(49) : warning 209: function "OnPlayerCommandText" should return a value
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#4

pawn Код:
#include <a_samp>
#define COLOR_RED 0xFF0000AA

enum pInfo
{
    pMember,
    pLeader,
};
new PlayerInfo[MAX_PLAYERS][pInfo];

new anarchy;

public OnGameModeInit()
{
    SetGameModeText("EMMR + FilterScript = Anarchy");
    //Createobject
    CreateObject(987, 964.838013, -1439.087036, 12.550484, 0.0000, 0.0000, 270.0000);
    CreateObject(987, 964.898743, -1443.841553, 12.564914, 0.0000, 0.0000, 270.0000);
    //Vдrav
    anarchy = CreateObject(980, 1041.197998, -1460.007813, 15.411911, 0.0000, 0.0000, 270.0000);
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext,"/opena", true) == 0)
    {
        if (PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)
        {
            MoveObject(anarchy, 1041.197998, -1460.007813, 9.786997,2.00);
        return 1;
        }
        else
        {
            SendClientMessage(playerid, COLOR_RED, " Sa pole maffiast Anarchy !");
        }
    }
    if(strcmp(cmdtext,"/closea", true) == 0)
    {
        if (PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)
        {
            MoveObject(anarchy, 1041.197998, -1460.007813, 15.411911, 2.00);
        return 1;
        }
        else
        {
            SendClientMessage(playerid, COLOR_RED, " Sa pole maffiast Anarchy !");
        }
    }
    return 0;
}
Reply
#5

Thanks PandaBeer1337.
Reply
#6

But, i got
Member = 15
Leader = 15

... i type /opena and /closea
and says You are not at mafia Anarchy!

umm.. ?
Reply
#7

B Ll M P 3 R
Reply
#8

I don't think it's possible to do it, probably you use godfather/carlito's roleplay,
Not sure if you can attach a filterscript with playerinfo to the gamemode.
Make permissions by the player's name, or by it's skinid.
Reply
#9

You can't attache an fs like this. Why dont you put it in the gm?
Reply
#10

Idk, i put now GM.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)