SA-MP Forums Archive
"PlayerInfo" (FS) - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: "PlayerInfo" (FS) (/showthread.php?tid=72995)



"PlayerInfo" (FS) - Typhome - 12.04.2009

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 !");
		}
	}
}



Re: "PlayerInfo" (FS) - Think - 12.04.2009

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 !");
		}
	}
}



Re: "PlayerInfo" (FS) - Typhome - 12.04.2009

Код:
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.



Re: "PlayerInfo" (FS) - Think - 12.04.2009

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;
}



Re: "PlayerInfo" (FS) - Typhome - 12.04.2009

Thanks PandaBeer1337.


Re: "PlayerInfo" (FS) - Typhome - 12.04.2009

But, i got
Member = 15
Leader = 15

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

umm.. ?


Re: "PlayerInfo" (FS) - Typhome - 12.04.2009

B Ll M P 3 R


Re: "PlayerInfo" (FS) - MenaceX^ - 12.04.2009

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.


Re: "PlayerInfo" (FS) - Rks25 - 12.04.2009

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


Re: "PlayerInfo" (FS) - Typhome - 12.04.2009

Idk, i put now GM.