SA-MP Forums Archive
[Include] And CheckPoint System v1.0 - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] And CheckPoint System v1.0 (/showthread.php?tid=320606)



And CheckPoint System v1.0 - andmeida10 - 23.02.2012

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


Re: And CheckPoint System v1.0 - MP2 - 23.02.2012

IsPayerInCP? I think you mean Player.
Nice work.


Re: And CheckPoint System v1.0 - andmeida10 - 24.02.2012

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

Thanks


Re: And CheckPoint System v1.0 - Niko_boy - 24.02.2012

Quote:

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

)
Nice


Re: And CheckPoint System v1.0 - System64 - 24.02.2012

nice but we already have streamer

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