[Help] Pulling something from my GM to FS
#1

Okay so In my gm I have

pawn Код:
PlayerInfo
And what I want to do is use a filterscript, that has to have that in it.
How do I do that?

Код:
(33) : warning 217: loose indentation
(43) : error 017: undefined symbol "PlayerInfo"
(43) : warning 215: expression has no effect
(43) : error 001: expected token: ";", but found "]"
(43) : error 029: invalid expression, assumed zero
(43) : fatal error 107: too many error messages on one
pawn Код:
#include <a_samp>
#define FILTERSCRIPT
#if defined FILTERSCRIPT
forward IsAGangCar(carid);
public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else
#endif
public OnPlayerConnect(playerid)
{
    AddStaticVehicle(451,2473.3513,-1694.6342,13.2228,359.2836,7,7);// 269
    AddStaticVehicle(451,2489.6106,-1682.7407,13.0427,87.9387,7,7);// 270
    return 1;
}

public IsAGangCar(carid)
{
if(carid >= 269 && carid <= 270)
    {
        return 1;
    }
(33)**  return 0;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
      new newcar = GetPlayerVehicleID(playerid);
      if(IsAGangCar(newcar))
      {
(43)****          if(PlayerInfo[playerid][pLeader] == 15||PlayerInfo[playerid][pMember] == 15) { }
          else {
        RemovePlayerFromVehicle(playerid);
        SendClientMessage(playerid, COLOR_GREY,"You don't have keys to this vehicle.");}
        }
    }
    return 1;
}
Reply
#2

You have to define PlayerInfo and put the other info into it, for example:
pawn Код:
enum Info
{
  Leader,
  Member,
};

new PlayerInfo[MAX_PLAYERS][Info];
Reply
#3

Okay, so if we have

pawn Код:
if(PlayerInfo[playerid][pMember] == 15)
Will it check the GM for that still, even if it's redefined?
Reply
#4

Not necessarily. If you want functions from another source to work inside your gamemode, you'd have to add a include. If you want to make it a filterscript, you'd have to re-add your register system and everything to do with that gang/faction.
Reply
#5

Okay, thanks.

I got it compiled, I will see what I can do with it from here.
Reply
#6

you can also use mysql to save the values from gm and the nload the values in fs.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)