Jump to content

problema misiuni


AlexCelTare

Recommended Posts

    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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.