[Include] [INC]Checkpoint manager
#1

This inc is to create checkpoints in the easiest way:

you define the area where the checkpoint has to appear, it's position, and when OnPlayerEnterCheckpoint is called, you can know in what checkpoint he entered!

first, the link: http://rapidshare.com/files/56568239/CM.rar

now, let's explain how to "install" it

first, you have to copy the CM.inc into the include folder

then, it's time to code!

put this in OnGameModeInit:
Code:
SetTimer("CMCheck",500,1);
then, to add an "area" and a checkpoint for this area, just do this:
Code:
new areaid = CMAdd(minx, miny, maxx, maxy,check_x, check_y,check_z,check_radius);
the last thing, now.
put this in OnPlayerEnterCheckpoint to know the checkpoint id:
Code:
new id=CMGetCheckID(playerid);
for example:
Code:
public OnPlayerEnterCheckpoint(playerid)
{
	new id=CMGetCheckID(playerid);
	new string[50];
	format(string,50,"OnPlayerEnterCheckpoint(%d,%d)",playerid,id);
	SendClientMessageToAll(0xAA0000FF,string);
	return 1;
}
enjoy, and tell me if there are bugs or you have suggestions

Roby65
Reply


Messages In This Thread
[INC]Checkpoint manager - by roby65 - 18.09.2007, 15:12
Re: [INC]Checkpoint manager - by ciola90 - 18.09.2007, 17:06
Re: [INC]Checkpoint manager - by roby65 - 18.09.2007, 18:29
Re: [INC]Checkpoint manager - by Hiphop - 18.09.2007, 18:54
Re: [INC]Checkpoint manager - by roby65 - 18.09.2007, 19:48
Re: [INC]Checkpoint manager - by Alejandro - 19.09.2007, 01:43
Re: [INC]Checkpoint manager - by roby65 - 19.09.2007, 13:04
Re: [INC]Checkpoint manager - by bossapro - 07.10.2007, 22:26
Re: [INC]Checkpoint manager - by chris23 - 28.10.2007, 11:37
Re: [INC]Checkpoint manager - by TheSh@rk - 28.10.2007, 11:56

Forum Jump:


Users browsing this thread: 2 Guest(s)