Looking for a solution to a problem.
#1

Looking for somebody that could help me via team viewer with my problem I have. When I go over a checkpoint nothing happens when there should be something happening.

The reason why I would prefer team viewer for this is that it is most likely easier to understand if you were just to see the script.

Please PM me if you are interested in helping. I have teamspeak also If that is wanted during the teamviewer session.

I'll give Reputation to the person who helps me. Also
Reply
#2

I will try to help u.
Reply
#3

The person above was unable to help me, so I am gonna post portions of the code on here to see if somebody can troubleshoot the issue.

Variables/Arrays Used
Код:
#define PMAX 100

new Player_ClassD[PMAX];

new Float:ClassD_Cords[32][3] = {
{1365.1969,454.4475,19.7603},
{1013.9526,469.2932,19.7578},
{606.2943,308.1343,19.4191},
{493.6285,222.2937,12.3951},
{230.2303,34.6752,2.3047},
{218.2137,-19.0919,1.3081},
{169.5892,-69.0792,1.3046},
{146.4769,-144.5515,1.3073},
{180.2351,-224.2368,1.3081},
{205.3232,-296.0280,1.3028},
{480.7551,-415.3484,28.4136},
{628.6153,-482.4024,16.0625},
{638.9536,-543.5073,16.0562},
{694.6979,-602.9213,16.0637},
{734.6536,-532.8571,16.0619},
{804.8611,-532.8922,16.0624},
{845.1074,-569.1362,16.3679},
{1263.0756,-409.3285,2.3792},
{1276.2931,-386.7701,2.3680},
{1757.5521,-347.0477,46.2689},
{1917.7421,39.6249,34.1198},
{2238.3418,40.2408,26.2109},
{2291.3760,27.6378,26.2123},
{2291.3628,-40.9146,26.2129},
{2305.6174,-101.0875,26.2113},
{2346.4211,-13.7758,26.2120},
{2346.4475,104.0971,26.2121},
{2329.8523,216.3444,26.1998},
{2034.1545,301.9546,26.4643},
{1767.3313,388.2863,19.2243},
{1367.9944,433.0092,19.5984},
{1341.9498,405.6249,19.4350}};
The command used to start the test. Works fine.
Код:
if(Compare(command, "/test"))
{
	if(GetPlayerState(playerid) == 2)
	{
		new i = GetVehicleID(GetPlayerVehicleID(playerid));
		if(i != -1)
		{
			if(Vehicle_Type[i] == 4)
		        {
				if(Compare(Vehicle_Owner[i], "4"))
		            	{
					if(Player_ClassD[playerid] == 32)
					{
						SendClientMessage(playerid, COLOR_GREY, "You already have your Class D License.");
					}
					else if(Player_ClassD[playerid] >= 0)
					{
						SendClientMessage(playerid, COLOR_GREY, "Class D test already in progress.");
					}
					else
					{
						SetPlayerCheckpoint(playerid, ClassD_Cords[0][0], ClassD_Cords[0][1], ClassD_Cords[0][1], 5);
						SendClientMessage(playerid, COLOR_GREEN, "Class D Test Started.");
						Player_ClassD[playerid] = 0;
					}
				}
			}
		}
	}
	return 1;
}
OnPlayerEnterCheckpoint
Код:
public OnPlayerEnterCheckpoint(playerid)
{
	if(Player_ClassD[playerid] >= 0 && Player_ClassD[playerid] < 32)
	{
	    Player_ClassD[playerid]++;
	    SetPlayerCheckpoint(playerid, ClassD_Cords[Player_ClassD[playerid]][0], ClassD_Cords[Player_ClassD[playerid]][1], ClassD_Cords[Player_ClassD[playerid]][2], 5);
	}
}
Reply
#4

The error is one in which the compiler won't pick up but will make everything in that the OnPlayerEnterCheckpoint callback not execute. I have disable everything else with that callback and that didn't do anything so I would assume that everything else wouldn't affect that. I think the problem may lay within the reading of the array to create the new checkpoint that causes that callback not to execute.
Reply
#5

Anybody?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)