SA-MP Forums Archive
Checkpoint Not working - 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: Checkpoint Not working (/showthread.php?tid=452654)



Checkpoint Not working - tboysamp - 22.07.2013

I need help with this checkpoint. Every other checkpoint works except dmvcplast, when I enter dmvcplast nothing happens. The checkpoint stays there and I don't get the license and the client message doesnt send. i'm wondering if some one could mabye figure out the issue
Код:
1.
        new dmvcar = GetPlayerVehicleID(playerid);

2.
        if(dmvcar == dmv[0] || dmvcar == dmv[1] || dmvcar == dmv[2] || dmvcar == dmv[3] || dmvcar == dmv[4])

3.
        {

4.
            if(takingdmv[playerid] = 1)

5.
            {

6.
                if(CP[playerid] == dmvcp1)

7.
                {

8.
                                DisablePlayerCheckpoint(playerid);

9.
                                dmvcp2 = SetPlayerCheckpoint(playerid,-54.7761,1201.7308,19.2109,3.0);

10.
                                SCM(playerid,COLOR_YELLOW,"DMV: Good, now proceed to the next checkpoint.");

11.
                        }

12.
                        else if(CP[playerid] == dmvcp2)

13.
                        {

14.
                            dmvcp2 = DisablePlayerCheckpoint(playerid);

15.
                                dmvcp3 = SetPlayerCheckpoint(playerid,-49.9239,1146.0499,19.5930,3.0);

16.
                                SCM(playerid,COLOR_YELLOW,"DMV: Good, now proceed to the next checkpoint.");

17.
                        }

18.
                        else if(CP[playerid] == dmvcp3)

19.
                        {

20.
                            dmvcp3 = DisablePlayerCheckpoint(playerid);

21.
                                dmvcp4 = SetPlayerCheckpoint(playerid,27.4992,1128.0336,19.5938,3.0);

22.
                                SCM(playerid,COLOR_YELLOW,"DMV: Good, now proceed to the next checkpoint.");

23.
                        }

24.
                        else if(CP[playerid] == dmvcp4)

25.
                        {

26.
                            dmvcp4 =DisablePlayerCheckpoint(playerid);

27.
                                dmvcp5 = SetPlayerCheckpoint(playerid,-17.4935,1071.4863,19.5938,3.0);

28.
                                SCM(playerid,COLOR_YELLOW,"DMV: Good, now proceed to the next checkpoint.");

29.
                        }

30.
                        else if(CP[playerid] == dmvcp5)

31.
                        {

32.
                            dmvcp5 =DisablePlayerCheckpoint(playerid);

33.
                                dmvcp6 = SetPlayerCheckpoint(playerid,-62.5911,1037.3400,19.5938,3.0);

34.
                                SCM(playerid,COLOR_YELLOW,"DMV: Good, now proceed to the next checkpoint.");

35.
                        }

36.
                        else if(CP[playerid] == dmvcp6)

37.
                        {

38.
                            dmvcp6 =DisablePlayerCheckpoint(playerid);

39.
                                dmvcp7 = SetPlayerCheckpoint(playerid,-88.7619,1100.6285,19.5938,3.0);

40.
                                SCM(playerid,COLOR_YELLOW,"DMV: Good, now proceed to the next checkpoint.");

41.
                        }

42.
                        else if(CP[playerid] == dmvcp7)

43.
                        {

44.
                            dmvcp7 =DisablePlayerCheckpoint(playerid);

45.
                                dmvcp8 = SetPlayerCheckpoint(playerid,-188.0131,1117.1333,19.5969,3.0);

46.
                                SCM(playerid,COLOR_YELLOW,"DMV: Good, now proceed to the next checkpoint.");

47.
                        }

48.
                        else if(CP[playerid] == dmvcp8)

49.
                        {

50.
                            dmvcp8 =DisablePlayerCheckpoint(playerid);

51.
                                dmvcp9 = SetPlayerCheckpoint(playerid,-187.4841,1180.7617,19.5907,3.0);

52.
                                SCM(playerid,COLOR_YELLOW,"DMV: Good, now proceed to the next checkpoint.");

53.
                        }

54.
                        else if(CP[playerid] == dmvcp9)

55.
                        {

56.
                            dmvcp9 =DisablePlayerCheckpoint(playerid);

57.
                                dmvcp10 = SetPlayerCheckpoint(playerid,-95.2145,1195.9398,19.5938,3.0);

58.
                                SCM(playerid,COLOR_YELLOW,"DMV: Good, now proceed to the next checkpoint.");

59.
                        }

60.
                        else if(CP[playerid] == dmvcp10)

61.
                        {

62.
                            dmvcp10 =DisablePlayerCheckpoint(playerid);

63.
                                dmvcplast = SetPlayerCheckpoint(playerid,42.2369,1213.7709,19.0469,3.0);

64.
                                SCM(playerid,COLOR_YELLOW,"DMV: Good, now proceed to the next checkpoint.");

65.
                        }

66.
                    else if(CP[playerid] == dmvcplast)

67.
                        {

68.
                            dmvcplast =DisablePlayerCheckpoint(playerid);

69.
                                PlayerInfo[playerid][pDriversLic] = 1;

70.
                            PlayerInfo[playerid][pDriversLicP] = 5;

71.
                            SCM(playerid,COLOR_GREEN,"DMV: Congratulations!, You've earned your drivers license.");

72.
                            //takingdmv[playerid] = 0;

73.
                        }

74.
                }

75.
                return 1;

76.
        }