Dynamic CP's
#1

How to detect if a player enters dynamic CP (streamer plugin)?

I tried this:
Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid);
{
	return 1;
}
But it's giving me errors.
Reply
#2

You're doing it wrong somewhere.

Post what the compiler said.
Reply
#3

pawn Код:
error 055: start of function body without function header
error 010: invalid function or declaration
Made the error lines bold on first post.
Reply
#4

remove the ; from public OnPlayerEnterDynamicCP(playerid, checkpointid);


pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    return 1;
}
Reply
#5

Aww, I am so dumb. How could I have missed that.. thanks!
Reply
#6

ERROR:

pawn Код:
error 008: must be a constant expression; assumed zero
This is the code:
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    switch(checkpointid)
    {
        case A51CP: // The error line
        {
            SendClientMessage(playerid, C_GREY, "Works!");
        }
    }
   
    return 1;
}
Reply
#7

pawn Код:
#define A51CP (0) // A51CP has the ID 0
So its like doing case: 0
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)