How can i make checkpoints ???!!!
#1

My friend gave me a gamemode which i found a scripted DMV , people will go /getlic and buy the car licenses and i found a scripted test but not really used but when i used it it gives me one checkpoint only and then done
here is "OnPlayerEnterCheckPoint"
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(CP[playerid]==200)
    {

        if(IsPlayerInVehicle(playerid, dmv1) || IsPlayerInVehicle(playerid, dmv2) || IsPlayerInVehicle(playerid, dmv3) || IsPlayerInVehicle(playerid, dmv4) || IsPlayerInVehicle(playerid, dmv5))
        {
            DisablePlayerCheckpoint(playerid);
            CP[playerid] = 201;
            SetPlayerCheckpoint(playerid, 2085.0381,-1872.4524,13.2172, 5.0);
        }
        else
        {
            SendClientMessage(playerid, COLOR_LIGHTBLUE,"DMV: You are not in the car!");
            SendClientMessage(playerid, COLOR_LIGHTBLUE,"DMV: You didn't pass the test, please try again!");
            DisablePlayerCheckpoint(playerid);
            RemovePlayerFromVehicle(playerid);
            SetVehicleToRespawn(GetPlayerVehicleID(playerid));
            TakingLesson[playerid] = 0;
            PlayerInfo[playerid][pCarLic] = 0;
        }
    }
    else if(CP[playerid]==201)
    {
        DisablePlayerCheckpoint(playerid);
        CP[playerid] = 202;
        SetPlayerCheckpoint(playerid, 2084.1689,-1803.9979,13.2578, 5.0);
    }
    else if(CP[playerid]==202)
    {
        DisablePlayerCheckpoint(playerid);
        CP[playerid] = 203;
        SetPlayerCheckpoint(playerid, 2091.2979,-1766.2080,13.2713, 5.0);
    }
    else if(CP[playerid]==203)
    {
        DisablePlayerCheckpoint(playerid);
        CP[playerid] = 204;
        SetPlayerCheckpoint(playerid, 2105.5391,-1754.3374,13.2727, 5.0);
    }
    else if(CP[playerid]==204)
    {
        DisablePlayerCheckpoint(playerid);
        CP[playerid] = 205;
        SetPlayerCheckpoint(playerid,2105.5391,-1754.3374,13.2727, 5.0);
    }
    else if(CP[playerid]==205)
    {
        DisablePlayerCheckpoint(playerid);
        CP[playerid] = 206;
        SetPlayerCheckpoint(playerid, 2152.3264,-1755.3739,13.2650, 5.0);
    }
    else if(CP[playerid]==206)
    {
        DisablePlayerCheckpoint(playerid);
        CP[playerid] = 207;
        SetPlayerCheckpoint(playerid, 2187.6792,-1721.5868,13.2507, 5.0);
    }
    else if(CP[playerid]==207)
    {
        DisablePlayerCheckpoint(playerid);
        CP[playerid] = 208;
        SetPlayerCheckpoint(playerid, 2199.7029,-1641.8521,15.1844, 5.0);
    }
    else if(CP[playerid]==208)
    {
        DisablePlayerCheckpoint(playerid);
        CP[playerid] = 209;
        SetPlayerCheckpoint(playerid, 2214.8254,-1517.7747,23.7031, 5.0);
    }
    else if(CP[playerid]==209)
    {
        DisablePlayerCheckpoint(playerid);
        CP[playerid] = 210;
        SetPlayerCheckpoint(playerid, 2215.1040,-1394.6154,23.6945, 5.0);
    }
    else if(CP[playerid]==210)
    {
        DisablePlayerCheckpoint(playerid);
        CP[playerid] = 211;
        SetPlayerCheckpoint(playerid, 2190.2942,-1381.7357,23.7032, 5.0);
    }
    else if(CP[playerid]==211)
    {
        DisablePlayerCheckpoint(playerid);
        CP[playerid] = 212;
        SetPlayerCheckpoint(playerid,2132.9697,-1381.4398,23.7070, 5.0);
    }
    else if(CP[playerid]==212)
    {
        DisablePlayerCheckpoint(playerid);
        CP[playerid] = 213;
        SetPlayerCheckpoint(playerid, 2109.5398,-1405.0721,23.7031, 5.0);
    }
    else if(CP[playerid]==213)
    {
        DisablePlayerCheckpoint(playerid);
        CP[playerid] = 214;
        SetPlayerCheckpoint(playerid, 2110.0920,-1500.6836,23.6733, 5.0);
    }
    else if(CP[playerid]==214)
    {
        DisablePlayerCheckpoint(playerid);
        CP[playerid] = 215;
        SetPlayerCheckpoint(playerid,2109.7747,-1677.0518,13.2956, 5.0);
    }
    else if(CP[playerid]==215)
    {
        DisablePlayerCheckpoint(playerid);
        CP[playerid] = 217;
        SetPlayerCheckpoint(playerid, 2093.8115,-1737.9851,13.2656, 5.0);
    }
    else if(CP[playerid]==217)
    {
        DisablePlayerCheckpoint(playerid);
        CP[playerid] = 218;
        SetPlayerCheckpoint(playerid,2079.2031,-1820.7201,13.2576 , 5.0);
    }
    else if(CP[playerid]==218)
    {
        DisablePlayerCheckpoint(playerid);
        CP[playerid] = 219;
        SetPlayerCheckpoint(playerid, 2073.0000,-1907.7925,13.5469, 5.0);
    }
    else if(CP[playerid]==219)
    {
        new pName[24];
        new str[128];
        GetPlayerName(playerid, pName, 24);
        pName[strfind(pName,"_")] = ' ';
        format(str, 128,"DMV: Congratulations %s! You passed the test.", pName);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
        TakingLesson[playerid] = 0;
        PlayerInfo[playerid][pCarLic] = 1;
        DisablePlayerCheckpoint(playerid);
        SetVehicleToRespawn(GetPlayerVehicleID(playerid));
        RemovePlayerFromVehicle(playerid);
    }
And this what i've found on the Car licenses DIALOG after you buy
pawn Код:
if(listitem == 0) // Car License
            {
                if(PlayerInfo[playerid][pCarLic] == 1) return SCM(playerid, COLOR_GREY,"You already have a Driving License!");
                if(PlayerInfo[playerid][pCash] < 2000) return SCM(playerid, COLOR_GREY, "You cannot afford this license!");
               
                PlayerInfo[playerid][pCarLic] = 1;
                PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-2000;
                GivePlayerMoney(playerid,-2000);
                SCM(playerid, COLOR_WHITE, "Congratulations with your driving license!, we hope you will use it wisely");

                /*
                TogglePlayerControllable(playerid, 1);
                CP[playerid] = 200;
                SetPlayerCheckpoint(playerid, 2073.780029,-1912.620361,13.244957, 4.0);
                TakingLesson[playerid] = 1;
                PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-200;
                GivePlayerMoney(playerid,-200);
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "Driver Instructor says: Please follow me outside and enter a white DMV car");
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "Driver Instructor says: Please follow the checkpoints and drive safely");*/


            }
Can anyone please fix the checkpoints so players will have a car licenses on a test please ? , there is only 1 checkpoint here
Reply
#2

Quote:
And this what i've found on the Car licenses DIALOG after you buy
pawn Код:
if(listitem == 0) // Car License
            {
                if(PlayerInfo[playerid][pCarLic] == 1) return SCM(playerid, COLOR_GREY,"You already have a Driving License!");
                if(PlayerInfo[playerid][pCash] < 2000) return SCM(playerid, COLOR_GREY, "You cannot afford this license!");
               
                PlayerInfo[playerid][pCarLic] = 1;
                PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-2000;
                GivePlayerMoney(playerid,-2000);
                SCM(playerid, COLOR_WHITE, "Congratulations with your driving license!, we hope you will use it wisely");

                /*
                TogglePlayerControllable(playerid, 1);
                CP[playerid] = 200;
                SetPlayerCheckpoint(playerid, 2073.780029,-1912.620361,13.244957, 4.0);
                TakingLesson[playerid] = 1;
                PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-200;
                GivePlayerMoney(playerid,-200);
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "Driver Instructor says: Please follow me outside and enter a white DMV car");
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "Driver Instructor says: Please follow the checkpoints and drive safely");*/


            }
Can anyone please fix the checkpoints so players will have a car licenses on a test please ? , there is only 1 checkpoint here

In your Describtion of all these dialogs, the Variable "CP" is used to say, which dialog the player should see. But in your dialog I quoted, there is no call of the variable. So maybe you should do: CP[playerid] = 200;

//EDIT:

But, in addition in your "License Dialog" there is no call for the function SetPlayerCheckpoint. So that is the reason why you cannot see anything.
Reply
#3

I don't understand i don't know how to script sorry :P

But i can see only the first checkpoint
Reply
#4

Well,when player selects listitem 1'which is driving license,you didnt make it show him a checkpoint ...thats why it doesnt work
Reply
#5

There is already i tried to fix it it gives me Checkpoint and then when i drive there , nothing happens O_O
pawn Код:
if(dialogid == DIALOG_GETLIC)
    {
        if(response)
        {
            if(listitem == 0) // Car License
            {
                if(PlayerInfo[playerid][pCarLic] == 1) return SCM(playerid, COLOR_GREY,"You already have a Driving License!");
                if(PlayerInfo[playerid][pCash] < 2000) return SCM(playerid, COLOR_GREY, "You cannot afford this license!");
                PlayerInfo[playerid][pCarLic] = 1;
                PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-2000;
                GivePlayerMoney(playerid,-2000);
                SCM(playerid, COLOR_WHITE, "Congratulations with your driving license!, we hope you will use it wisely");


      /*
                TogglePlayerControllable(playerid, 1);
                CP[playerid] = 200;
                SetPlayerCheckpoint(playerid, 2073.780029,-1912.620361,13.244957, 4.0);
                TakingLesson[playerid] = 1;
                PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-2000;
                GivePlayerMoney(playerid,-2000);
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "Driver Instructor says: Please follow me outside and enter a white DMV car");
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "Driver Instructor says: Please follow the checkpoints and drive safely");
                   

                if(CP[playerid]==200)
                {
                    DisablePlayerCheckpoint(playerid);
                    CP[playerid] = 201;
                    SetPlayerCheckpoint(playerid, 2085.0381,-1872.4524,13.2172, 5.0);
                }
                else if(CP[playerid]==201)
                {
                    DisablePlayerCheckpoint(playerid);
                    CP[playerid] = 202;
                    SetPlayerCheckpoint(playerid, 2084.1689,-1803.9979,13.2578, 5.0);
                }
                else if(CP[playerid]==202)
                {
                    DisablePlayerCheckpoint(playerid);
                    CP[playerid] = 203;
                    SetPlayerCheckpoint(playerid, 2091.2979,-1766.2080,13.2713, 5.0);
                }
                else if(CP[playerid]==203)
                {
                    DisablePlayerCheckpoint(playerid);
                    CP[playerid] = 204;
                    SetPlayerCheckpoint(playerid, 2105.5391,-1754.3374,13.2727, 5.0);
                }
                else if(CP[playerid]==204)
                {
                    DisablePlayerCheckpoint(playerid);
                    CP[playerid] = 205;
                    SetPlayerCheckpoint(playerid,2105.5391,-1754.3374,13.2727, 5.0);
                }
                else if(CP[playerid]==205)
                {
                    DisablePlayerCheckpoint(playerid);
                    CP[playerid] = 206;
                    SetPlayerCheckpoint(playerid, 2152.3264,-1755.3739,13.2650, 5.0);
                }
                else if(CP[playerid]==206)
                {
                    DisablePlayerCheckpoint(playerid);
                    CP[playerid] = 207;
                    SetPlayerCheckpoint(playerid, 2187.6792,-1721.5868,13.2507, 5.0);
                }
                else if(CP[playerid]==207)
                {
                    DisablePlayerCheckpoint(playerid);
                    CP[playerid] = 208;
                    SetPlayerCheckpoint(playerid, 2199.7029,-1641.8521,15.1844, 5.0);
                }
                else if(CP[playerid]==208)
                {
                    DisablePlayerCheckpoint(playerid);
                    CP[playerid] = 209;
                    SetPlayerCheckpoint(playerid, 2214.8254,-1517.7747,23.7031, 5.0);
                }
                else if(CP[playerid]==209)
                {
                    DisablePlayerCheckpoint(playerid);
                    CP[playerid] = 210;
                    SetPlayerCheckpoint(playerid, 2215.1040,-1394.6154,23.6945, 5.0);
                }
                else if(CP[playerid]==210)
                {
                    DisablePlayerCheckpoint(playerid);
                    CP[playerid] = 211;
                    SetPlayerCheckpoint(playerid, 2190.2942,-1381.7357,23.7032, 5.0);
                }
                else if(CP[playerid]==211)
                {
                    DisablePlayerCheckpoint(playerid);
                    CP[playerid] = 212;
                    SetPlayerCheckpoint(playerid,2132.9697,-1381.4398,23.7070, 5.0);
                }
                else if(CP[playerid]==212)
                {
                    DisablePlayerCheckpoint(playerid);
                    CP[playerid] = 213;
                    SetPlayerCheckpoint(playerid, 2109.5398,-1405.0721,23.7031, 5.0);
                }
                else if(CP[playerid]==213)
                {
                    DisablePlayerCheckpoint(playerid);
                    CP[playerid] = 214;
                    SetPlayerCheckpoint(playerid, 2110.0920,-1500.6836,23.6733, 5.0);
                }
                else if(CP[playerid]==214)
                {
                    DisablePlayerCheckpoint(playerid);
                    CP[playerid] = 215;
                    SetPlayerCheckpoint(playerid,2109.7747,-1677.0518,13.2956, 5.0);
                }
                else if(CP[playerid]==215)
                {
                    DisablePlayerCheckpoint(playerid);
                    CP[playerid] = 217;
                    SetPlayerCheckpoint(playerid, 2093.8115,-1737.9851,13.2656, 5.0);
                }
                else if(CP[playerid]==217)
                {
                    DisablePlayerCheckpoint(playerid);
                    CP[playerid] = 218;
                    SetPlayerCheckpoint(playerid,2079.2031,-1820.7201,13.2576 , 5.0);
                }
                else if(CP[playerid]==218)
                {
                    DisablePlayerCheckpoint(playerid);
                    CP[playerid] = 219;
                    SetPlayerCheckpoint(playerid, 2073.0000,-1907.7925,13.5469, 5.0);
                }
                else if(CP[playerid]==219)
                {
                    new pName[24];
                    new str[128];
                    GetPlayerName(playerid, pName, 24);
                    pName[strfind(pName,"_")] = ' ';
                    format(str, 128,"DMV: Congratulations %s! You passed the test.", pName);
                    SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
                    TakingLesson[playerid] = 0;
                    PlayerInfo[playerid][pCarLic] = 1;
                    DisablePlayerCheckpoint(playerid);
                    SetVehicleToRespawn(GetPlayerVehicleID(playerid));
                    RemovePlayerFromVehicle(playerid);
                }*/

            }
I disabled them for now till someone helps :/
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)