[Include] And CheckPoint System v1.0
#1

Hi everyone...


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
Reply
#2

IsPayerInCP? I think you mean Player.
Nice work.
Reply
#3

Quote:
Originally Posted by MP2
Посмотреть сообщение
IsPayerInCP? I think you mean Player.
Nice work.
Corrected...

Thanks
Reply
#4

Quote:

OnPlayerInCheckpoint(playerid, checkpointid);
OnPlayerOutCheckpoint(playerid, checkpointid);

)
Nice
Reply
#5

nice but we already have streamer

also when you make includes, make as much functions as you can
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)