Checkpoints
#1

I've got an issue where the checkpoint does not align with the coordination at all.
The checkpoint is for some reason up in the sky. Thanks in advance.

PHP код:
CMD:licenseexam(playeridparams[])
{
    if(!
IsPlayerInDMVVehicle(playerid))
        return 
SendErrorMessage(playerid"You aren't in a license exam vehicle."); 
        
    if(
GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
        return 
SendErrorMessage(playerid"You aren't in the driver's seat."); 
        
    if(
PlayerTakingLicense[playerid])
        return 
SendErrorMessage(playerid"You're already in middle of a test.");
        
    new
        
vehicleid GetPlayerVehicleID(playerid);
    
PlayerTakingLicense[playerid] = true
    
PlayerLicenseTime[playerid] = 60;
    
    
PlayersLicenseVehicle[playerid] = vehicleid;
    
PlayerLicensePoint[playerid] = 0
    
    
ToggleVehicleEngine(vehicleidtrue); 
    
VehicleInfo[vehicleid][eVehicleEngineStatus] = true;
    
    
SendClientMessage(playeridCOLOR_GREY"License instructor says: Follow the checkpoints and the rules of the road.");
    
SetPlayerCheckpoint(playeridLicensetestInfo[0][eCheckpointX], LicensetestInfo[1][eCheckpointY], LicensetestInfo[2][eCheckpointZ], 3.0); 
    return 
1;

PHP код:
enum E_LICENSETEST_INFO
{
    
FloateCheckpointX,
    
FloateCheckpointY,
    
FloateCheckpointZ,
    
booleFinishLine
}
new 
LicensetestInfo[][E_LICENSETEST_INFO] = 
{
    {-
2464.2052300.627712.59501false},
    {-
2543.6092333.343014.59201false},
    {
1122.9329, -1572.205213.4022false},
    {
1046.1570, -1569.957513.3828false},
    {
1050.3602, -1506.801113.3906false},
    {
1065.1661, -1416.765313.4577false},
    {
1183.5283, -1405.490613.2156false},
    {
1261.6847, -1405.895913.0086false},
    {
1332.1536, -1405.693213.3703false},
    {
1324.8597, -1486.784813.3828false},
    {
1295.2579, -1561.251613.3906true}
}; 
Reply
#2

Use this:

SetPlayerCheckpoint(playerid, LicensetestInfo[0][eCheckpointX], LicensetestInfo[0][eCheckpointY], LicensetestInfo[0][eCheckpointZ], 3.0);

What your code does, is take X of array item 0, Y of array item 1 and Z of array item 2, that way coцrdinates got mixed up
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)