Jump to content

Recommended Posts

Posted

    if (strcmp("/startmission", cmdtext, true, 10) == 0)
    {
        if(IsPlayerInRangeOfPoint(playerid, 2.0, 2333.1101,-1072.5065,1049.0234))
        {
            SetPlayerCheckpoint(playerid, -2091.9893,-2463.1599,30.6250, 3.0);
        }
    }
    else if(IsPlayerInRangeOfPoint(playerid, 2.0, 2333.2542,-1066.1041,1049.0234))
        {
            SetPlayerCheckpoint(playerid, -2176.0645,-2364.3694,30.6250, 3.0);
        }
    else if(IsPlayerInRangeOfPoint(playerid, 2.0, 2331.9038,-1061.8888,1049.0234))
        {
            SetPlayerCheckpoint(playerid, -1226.2114,55.9318,14.1322, 3.0);
        }
    return 1;
}

problema e ca merge doar prima misiune,restul nu merg! help

Posted

Acolada care inchide primul if trebuie pusa la sfarsit, adica dupa toate cele 3 conditii cu IsPlayerInRangeOfPoint.

Cam asa:

    if (strcmp("/startmission", cmdtext, true, 10) == 0)
    {
        if(IsPlayerInRangeOfPoint(playerid, 2.0, 2333.1101,-1072.5065,1049.0234))
        {
            SetPlayerCheckpoint(playerid, -2091.9893,-2463.1599,30.6250, 3.0);
        }
    	else if(IsPlayerInRangeOfPoint(playerid, 2.0, 2333.2542,-1066.1041,1049.0234))
        {
            SetPlayerCheckpoint(playerid, -2176.0645,-2364.3694,30.6250, 3.0);
        }
    	else if(IsPlayerInRangeOfPoint(playerid, 2.0, 2331.9038,-1061.8888,1049.0234))
        {
            SetPlayerCheckpoint(playerid, -1226.2114,55.9318,14.1322, 3.0);
        }
        return true;
    }

Si ai grija sa nu stergi nici acel return 1 si acolada inchisa de la sfarsitul codului pe care l-ai pus tu aici, ca din cate vad alea par sa fie de la sfarsitul OnPlayerCommandText, nu de la sfarsitul comenzii.

Discord:
! Akan !#6675

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.