23.02.2012, 21:09
(
Последний раз редактировалось andmeida10; 24.02.2012 в 06:29.
)
Hi everyone...
I'm Portuguese, and today i did an include, about CheckPoints...
Those are the Funcions and Callbacks i made:
I'm going to show a simple example of the use of eath one...:
Testing: IsPlayerInCP(playerid, checkpointid);
Testing: ShowPlayerCheckpoint(playerid, checkpointid, Float, Float:y, Float:z, Floatize);
Testing: OnPlayerInCheckpoint(playerid, checkpointid);
Testing: OnPlayerOutCheckpoint(playerid, checkpointid);
I Hope You liked, and use it
Download v1.0
PasteBin
SolidFiles
Creator: andmeida10
I'm Portuguese, and today i did an include, about CheckPoints...
Those are the Funcions and Callbacks i made:
pawn Код:
OnPlayerInCheckpoint(playerid, checkpointid);
OnPlayerOutCheckpoint(playerid, checkpointid);
ShowPlayerCheckpoint(playerid, checkpointid, Float:x, Float:y, Float:z, Float:size); // checkpointid can't be '0'
IsPlayerInCP(playerid, checkpointid);
I'm going to show a simple example of the use of eath one...:
Testing: IsPlayerInCP(playerid, checkpointid);
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/TestIfIAmCP1", true)) //Will test if you are in the Checkpointid == 1
{
if(IsPlayerInCP(playerid, 2)) return SendClientMessage(playerid, 0xFF0000FF, "You are in CheckPointID number 2");
SendClientMessage(playerid, 0xFFFFFFFF, "You aren't in CheckPointID number 2");
return 1;
}
return 0;
}
Testing: ShowPlayerCheckpoint(playerid, checkpointid, Float, Float:y, Float:z, Floatize);
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/ShowMeCP3", true)) //Will Create the CheckPoint with ID number 3
{
ShowPlayerCheckpoint(playerid, 3, 10.0, 30.0, 15.0, 5.0);
SendClientMessage(playerid, 0xFF0000FF, "New CheckPoint created - ID 3");
return 1;
}
return 0;
}
Testing: OnPlayerInCheckpoint(playerid, checkpointid);
pawn Код:
public OnPlayerInCheckpoint(playerid, checkpointid)
{
if(IsPlayerInCP(playerid, 3)) return SendClientMessage(playerid, 0xFF0000FF, "You entered in CheckPointID number 3");
return 1;
}
Testing: OnPlayerOutCheckpoint(playerid, checkpointid);
pawn Код:
public OnPlayerOutCheckpoint(playerid, checkpointid)
{
if(IsPlayerInCP(playerid, 3)) return SendClientMessage(playerid, 0xFF0000FF, "You leaved CheckPointID number 3");
return 1;
}
I Hope You liked, and use it
Download v1.0
PasteBin
SolidFiles
Creator: andmeida10