[Include] [INC] Matraka's Checkpoint Streamer
#1

This is the first script that I release in this forum. This include can perform simple checkpoint handling functions.

Functions:

CPS_AddCheckpoint(Float:X,Float:Y,Float:Z,Floati ze,Floatpawn_dist);
Creates a checkpoint, with size and spawn distance options. It also returns the checkpoint ID.

CPS_IsPlayerInCheckpoint(playerid,cpid);
Checks if a player is in a specific checkpoint.

CPS_IsPlayerInAnyCheckpoint(playerid,cpid);
Checks if a player is in any checkpoint handled by the streamer.

CPS_RemoveCheckpoint(cpid);
It removes a checkpoint by the ID.

CPS_GetPlayerCheckpoint(playerid);
Returns the ID of the actual checkpoint of a player


[Download]
http://www.infernusgroup.com/cpstream.inc


Any doubts, please contact me on MSN: msn_matraka@gtabrasil.net

(Sorry for bad english, I am brazilian)

EDIT: Bugs with CPS_IsPlayerInCheckpoint and CPS_IsPlayerInAnyCheckpoint corrected.
Reply
#2

nice!
Reply
#3

nice. i will use it.
Reply
#4

thanks matraka.. i love u^^
Reply
#5

hey thnx i was looking for something like this
Reply
#6

Itґs most cool than all!

Very much, Mat!
Reply
#7

Lol Mat, thank you
Reply
#8

nice one keep up
Reply
#9

I got a problem... When I get near a checkpoint, it shows but... whenever the checkpoint spawns, I see the message which was supposed to appear when the player was IN the checkpoint...

My code:
pawn Code:
public CPCHECKER()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(CPS_IsPlayerInCheckpoint(i, test1))
            {
              SendClientMessage(i, COLOR_BLUE, "TEST1");
            }
            else if(CPS_IsPlayerInCheckpoint(i, test2))
            {
              SendClientMessage(i, COLOR_BLUE, "TEST2");
            }
        }
    }
}
Reply
#10

Ohhh, and how can I fix this? Ф great Alex?
Reply
#11

My bad... I'll fix this later...

But, you can do this in the callback OnPlayerEnterCheckpoint:

new cp = CPS_GetPlayerCheckpoint(playerid);
Reply
#12

GetPlayerCheckpoint will just check if the checkpoint is shown... I already tested it..
Reply
#13

No... I tested and it returned the checkpoint ID

pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    new tmp[256];
    new cpid = CPS_GetPlayerCheckpoint(playerid);
    format(tmp,256,"Vocк entrou no checkpoint %d",cpid);
    SendClientMessage(playerid,COLOR_RED,tmp);
    return 1;
}
Well, this is my script... I tested it with the LVDM gamemode.


Anyway, I reupped the include, you can download from the first post link.
Reply
#14

Ye, lol, stupid mistake by myself LOL
Reply
#15

True. Nicest one I found.
Reply
#16

After I download where do put this at?
Reply
#17

i think in 'pawno/includes'
and you will have to add '#include <cpstream>' to the top of your FS or GM.
Reply
#18

thank you
Reply
#19

Nice!

:P
Reply
#20

Sorry for bad english, I'm russian.

Well, [MPA]matraka_IDG(GTABR), pretty nice for the first time. But I've seen better. There is at least one mistake in your script.
If you set the new checkpoint for player without disabling the previous one, the size will not change. For example, if in the callback OnPlayerEnterCheckpoint() I moved the player from one checkpoint to another (with using your script), the checkpoint's size will not change.
I think you know how to fix this.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)