Jump to content
  • 0

Problema freeze


Miki DUTZA

Question

Salut, am si eu o problema. Pana acum n am mai intalnit o.. deci. Daca dau cumva TogglePlayerControlable(playerid, 1) si dupa mai jos in script vreau sa ii dau 0 jucatorul ramane tot blocat. Si asta se intampla cu mai multe comenzi, de parca nu isi mentine o ordine. In fine momentan doar cu toggleplayercontrolable am o problema mare. Stiti ce se intampla?

Quote

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys == KEY_SECONDARY_ATTACK && IsPlayerInRangeOfPoint(playerid, 3.0, 1781.0365,992.6588,988.2548)) 
    {
        if(showtable[playerid] == 0) {
            showtable[playerid] = 1;
            TogglePlayerControllable(playerid, true);
            new vw1 = GetPlayerVirtualWorld(playerid)+1;
            SetPlayerVirtualWorld(playerid, vw1);
            TogglePlayerSpectating(playerid, true);
            InterpolateCameraPos(playerid, 1777.885864, 990.707458, 990.052001, 1779.523681, 992.640197, 989.389953, 1000);
            InterpolateCameraLookAt(playerid, 1782.367675, 992.349853, 988.563537, 1784.402832, 992.619689, 988.297607, 1000);
            for(new i = 0; i < 27;i++) {
                TextDrawShowForPlayer(playerid, DrugP[i]);
            }
            SelectTextDraw(playerid, 0xff0000FF);
        }
        else if(showtable[playerid] == 1) 
        {
            CancelSelectTextDraw(playerid);
            showtable[playerid] = 0;
            SetPlayerPosEx(playerid, 1781.0365,992.6588,988.2548);
            new vw1 = GetPlayerVirtualWorld(playerid)-1;
            SetPlayerVirtualWorld(playerid, vw1);
            for(new i = 0; i < 27; i++) {
                TextDrawHideForPlayer(playerid, DrugP[i]);
            }
            TogglePlayerControllable(playerid, false);
            TogglePlayerSpectating(playerid, false);        
        }
    }
    return 1;
} 

 

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0
9 minutes ago, Miki DUTZA said:

Salut, am si eu o problema. Pana acum n am mai intalnit o.. deci. Daca dau cumva TogglePlayerControlable(playerid, 1) si dupa mai jos in script vreau sa ii dau 0 jucatorul ramane tot blocat. Si asta se intampla cu mai multe comenzi, de parca nu isi mentine o ordine. In fine momentan doar cu toggleplayercontrolable am o problema mare. Stiti ce 

Dacă pun prima oara sa ii seteze pozitia la xyz si dupa dau sa ii dea unfreeze îmi pune doar pozitia si daca pun prima oara unfreeze ii da doar unfreeze si nu seteaza pozitia

Link to comment
Share on other sites

  • 0
17 minutes ago, Miki DUTZA said:

Salut, am si eu o problema. Pana acum n am mai intalnit o.. deci. Daca dau cumva TogglePlayerControlable(playerid, 1) si dupa mai jos in script vreau sa ii dau 0 jucatorul ramane tot blocat. Si asta se intampla cu mai multe comenzi, de parca nu isi mentine o ordine. In fine momentan doar cu toggleplayercontrolable am o problema mare. Stiti ce se intampla?

 

Eu vad ca decat aici :

TogglePlayerControllable(playerid, false);
 TogglePlayerSpectating(playerid, false);     

Ai dat freeze, nu vad nicaieri cum ca ai dat unfreeze.

Link to comment
Share on other sites

  • 0
16 minutes ago, VAurel said:

Eu vad ca decat aici :

TogglePlayerControllable(playerid, false);
 TogglePlayerSpectating(playerid, false);     

Ai dat freeze, nu vad nicaieri cum ca ai dat unfreeze.

Aici sa fie din neatentia mea? Da eu știam ca true e sa îl blocheze si false sa îl deblocheze. 

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
Answer this question...

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