[Include] EasyCP - Creating CheckPoints easily.
#1

EasyCP - Manage CheckPoints easily!


FUNCTIONS
  • Normal CheckPoints
PHP код:
CreateCheckPoint(playerid, const fname[], Float:xFloat:yFloat:zFloat:sizeFloat:visibledistance STREAMER_CP_SD);
HideCheckPoint(playeridcheckpointid);
ShowCheckPoint(playeridcheckpointid);
DestroyCheckPoint(checkpointid); 
  • Race CheckPoints
PHP код:
CreateRaceCheckPoint(playeridfname[], typeFloat:xFloat:yFloat:zFloat:nextxFloat:nextyFloat:nextzFloat:sizeFloat:visibledistance STREAMER_RACE_CP_SD);
HideRaceCheckPoint(playeridcheckpointid);
ShowRaceCheckPoint(playeridcheckpointid);
DestroyRaceCheckPoint(checkpointid); 
MAX LENGTH of function name wouldn't be more then 27 character.

EXAMPLE
  • Norma CheckPoints
PHP код:

//FUNCTION
CreateCheckPoint(playeridTestCP5.05.05.02.0);
//Callback After, Player Enters in CheckPoint.
CheckPoint:TestCP(playeridcheckpointid)
{
    
SendClientMessage(playerid, -1"Wow. You entered in the checkpoint.");
    return 
1;

  • Race CheckPoints
PHP код:
CreateRaceCheckPoint(playeridTestRaceCP1555555555555+55545532.0);
RaceCheckPoint:TestRaceCP(playeridcheckpointid)
{
    
SendClientMessage(playerid, -1"Wow you entered in the Race CP");
    return 
1;

DOWNLOAD

GitHub

USED THINGS
CREDITS
  • Amagida (Medzvel) - Initial work - Medzvel
  • Sellize - Idea - Sellize
  • Emmet_ - Basic Things From easyDialogs.inc
  • IstuntmanI - Useful conversation - IstuntmanI
  • BigETI - Useful conversation - BigETI
Reply
#2

Great job, this can be very, very useful! Looking forward to any future updates
Reply
#3

Great job, looking forward for race checkpoints support.
Reply
#4

Quote:
Originally Posted by Sellize
Посмотреть сообщение
Great job, this can be very, very useful! Looking forward to any future updates
Thanks! I'm waiting for updates too
Reply
#5

UPDATED
  • Now include uses streamer CreateDynamicCP.
  • Now you can make as much CheckPoints you want, anyway callbacks are gonna work ok.
  • Removed automatic destroy of checkpoint and added checkpointid in the callback function. So now it looks like this:
    PHP код:
    CheckPoint:TestCP2(playeridcheckpointid)
    {
        return 
    1;

  • Added HideCheckPoint(playerid, checkpointid) function.
  • Added ShowCheckPoint(playerid, checkpointid) function.
  • Added DestroyCheckPoint(checkpointid) function.
  • And main thing: Optimised code
Thanks IstuntmanI and BigETI for useful conversations.
Reply
#6

Good work.
Reply
#7

How about some advanced features.

Код:
CreateCheckPointChain();
DestroyCheckPointChain(chainid);
AddCheckPointToChain(chainid, checkpointid);
StartCheckPointChain(playerid, chainid);
StopCheckPointChain(playerid);

forward OnPlayerEnterChainCP(playerid, chainid, checkpointid, chainpos);
Just some concept functions, automation of a chain of checkpoints is vital.
Reply
#8

Quote:
Originally Posted by Pottus
Посмотреть сообщение
How about some advanced features.

Код:
CreateCheckPointChain();
DestroyCheckPointChain(chainid);
AddCheckPointToChain(chainid, checkpointid);
StartCheckPointChain(playerid, chainid);
StopCheckPointChain(playerid);

forward OnPlayerEnterChainCP(playerid, chainid, checkpointid, chainpos);
Just some concept functions, automation of a chain of checkpoints is vital.
Will think about it. Thanks for suggestion.
Reply
#9

Good work.
Reply
#10

Great Job
Reply
#11

i like this things that make work easier..

good job
Reply
#12

UPDATED
  • Now include supports Race CheckPoints.
  • Now you can make Race CheckPoint using CreateRaceCheckPoint(playerid, fname[], type, Float: x, Float:y, Float:z, Float:nextx, Float:nexty, Float:nextz, Float: size, Float:visibledistance = STREAMER_RACE_CP_SD);
  • You can response when player enters in race checkpoint like this:
    PHP код:
    RaceCheckPoint:TestRaceCP(playeridcheckpointid)
    {
        return 
    1;

  • Added HideRaceCheckPoint(playerid, checkpointid) function.
  • Added ShowRaceCheckPoint(playerid, checkpointid) function.
  • Added DestroyRaceCheckPoint(checkpointid) function.
Reply
#13

Good job.
Reply
#14

Gj
Reply
#15

Quote:
Originally Posted by Unkovic
Посмотреть сообщение
Gj
Thanks!
Reply
#16

Nice include bro, i only have one issue when i use CreateCheckPoint but it not appear on the map, i have all includes required but nothing happen
Reply
#17

Quote:
Originally Posted by N3cromancer
Посмотреть сообщение
Nice include bro, i only have one issue when i use CreateCheckPoint but it not appear on the map, i have all includes required but nothing happen
already use ShowCheckPoint(playerid, checkpointid); ??
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)