SA-MP Forums Archive
CheckPoints Weird thingy :D - 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: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: CheckPoints Weird thingy :D (/showthread.php?tid=370725)



CheckPoints Weird thingy :D - CROSS_Hunter - 21.08.2012

the title says it!

I want a CP to appear in a place but it doesnt

pawn Код:
#define CP_BankExit 4
#define CP_BankMain 5
#define COLOR_ERROR 0xD2691EAA
#define DIALOG_BANK_LIST 6
pawn Код:
new Float:checkCoords[MAX_POINTS][4] = {
//my other CPS
{2304.6948,-17.3057,2312.3196,-13.2586}, //BankExit
{2311.6550,-13.6536,2316.6047,-0.1508}, //BankMain
//my other CPS
};

pawn Код:
new Float:checkpoints[MAX_POINTS][4] = {
//my other CPS
{2305.5889,-16.2092,26.7496,3.0}, //BankExit
{2315.8198,-7.2530,26.7422,3.0}, //BankMain
//my other CPS
};

pawn Код:
new checkpointType[MAX_POINTS] = {
//my other CPS
CP_BankExit,
CP_BankMain,
//my other CPS
};

pawn Код:
if(getCheckpointType(playerid) == CP_BankExit)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            SendClientMessage(playerid,COLOR_ERROR,"You must exit your vehicle before entering a checkpoint.");
            return 1;
        }
        SetPlayerInterior(playerid,0);
        SetPlayerPos(playerid,-1499.4198,919.6614,7.1875);
        SetPlayerFacingAngle(playerid,89.8244);
        SetCameraBehindPlayer(playerid);
        return 1;
    }
   
    if(getCheckpointType(playerid) == CP_BankMain)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            SendClientMessage(playerid,COLOR_ERROR,"You must exit your vehicle before entering a checkpoint.");
            return 1;
        }
        ShowPlayerDialog(playerid,DIALOG_BANK_LIST,DIALOG_STYLE_LIST,"Bank Options","Withdraw Money\nDeposit Money\nAccount Information\nTransfer Money","Select","Cancel");
        return 1;
    }



Re: CheckPoints Weird thingy :D - Kirollos - 21.08.2012



you didnt even create the checkpoint


Re: CheckPoints Weird thingy :D - CROSS_Hunter - 21.08.2012

Quote:
Originally Posted by kirollos
Посмотреть сообщение


you didnt even create the checkpoint
are you serious?

so whats the
pawn Код:
new Float:checkCoords[MAX_POINTS][4] = {
and the
pawn Код:
new Float:checkpoints[MAX_POINTS][4] = {
DOING??


Re: CheckPoints Weird thingy :D - SuperViper - 21.08.2012

Quote:
Originally Posted by CROSS_Hunter
Посмотреть сообщение
are you serious?

so whats the
pawn Код:
new Float:checkCoords[MAX_POINTS][4] = {
and the
pawn Код:
new Float:checkpoints[MAX_POINTS][4] = {
DOING??
Making an array doesn't do anything.


Re: CheckPoints Weird thingy :D - CROSS_Hunter - 21.08.2012

Quote:
Originally Posted by SuperViper
Посмотреть сообщение
Making an array doesn't do anything.
ye it does!! so how are my other checkpoints working?


Re: CheckPoints Weird thingy :D - SuperViper - 21.08.2012

Quote:
Originally Posted by CROSS_Hunter
Посмотреть сообщение
ye it does!! so how are my other checkpoints working?
Because you have SetPlayerCheckpoint to actually make them.


Respuesta: CheckPoints Weird thingy :D - HydraX - 21.08.2012

DO you even have SetPlayerCheckpoint? How does it work when you didn't even set one?!


Re: CheckPoints Weird thingy :D - Devilxz97 - 21.08.2012

https://sampwiki.blast.hk/wiki/Function:SetPlayerCheckpoint
https://sampwiki.blast.hk/wiki/OnPlayerEnterCheckpoint
https://sampwiki.blast.hk/wiki/IsPlayerInCheckpoint



Re: CheckPoints Weird thingy :D - JaKe Elite - 21.08.2012



you didn't create the checkpoint, you must SetPlayerCheckpoint to create it


Re: CheckPoints Weird thingy :D - CROSS_Hunter - 21.08.2012

OMG!! I USED ARRAYS TO CREATE THOSE CHECKPOINTS!! THOSE 2 CPS WERE WORKING ONDIFFERENT CO-ORDINATES BUT WHEN I CHANGED THEM THEY DONT APPEAR SO GUYS STOP SAYING THE SAME THING I USE AN ARRAY TO CREATE THE SETPLAYERCHECKPOINT AND AN ARRAY TO SET ITS CO-ORDINATES AND ANGLES AND AN ARRAY TO DEFINE ITS ID