GameText
#3

Pretty bad way to do it actually, it's better if you make a function AddRobPoint() for instance and this is very simple example...

pawn Код:
#define INVALID_ROB_POINT (0xFFFF)
#define MAX_ROB_POINTS 100

enum ROBDATA {
    RobID,
    bool:beingrobbed
}

new RobPoints[MAX_ROB_POINTS][ROBDATA];

public OnGameModeInit()
{
    for(new i = 0; i < MAX_ROB_POINTS; i++) { RobPoints[i][RobID] = INVALID_ROB_POINT; }
}

stock AddRobPoint(Float:robx, Float:roby, Float:robz)
{
    for(new i = 0; i < MAX_ROB_POINTS; i++)
    {
        if(RobPoints[i][RobID] == INVALID_ROB_POINT)
        {
             RobPoints[i][RobID] = CreateDynamicCP(robx, roby, robz, 2.0);
             return i;
        }
    }
    return INVALID_ROB_POINT;
}
That is just a basic set up you'll need more stuff in the enum such as recentlyrobbed, timetorob, playerrobid etc whatever you need goes into there then you just need to to update AddRobPoint() with additional parameters such as CP size etc in fact pretty much any dynamic system your write is going to follow this template design. I've written dozens of them so I can tell you the setup is almost always the same when designing dynamic systems.
Reply


Messages In This Thread
GameText - by thefatshizms - 04.05.2013, 16:41
Re: GameText - by RajatPawar - 04.05.2013, 17:19
Re: GameText - by Pottus - 04.05.2013, 17:35
Re: GameText - by thefatshizms - 04.05.2013, 17:47
Re: GameText - by Pottus - 04.05.2013, 18:00

Forum Jump:


Users browsing this thread: 1 Guest(s)