Jump to content

[REZOLVAT] Problmea ;


Guest story
 Share

Recommended Posts

                   if(dialogid == DIALOG_SKIP)
  1.     {
  2.         if(IsPlayerConnected(playerid))
  3.         {
  4.             foreach(Player,i)
  5.             if(TutTime >= 1)
            {
                TutTime = 99; PlayerInfo[pTut] = 1;
                gOoc = 0; gNews = 0; gFam = 0; gRad = 0; gTeamFac = 0; gClChat = 0;
                TogglePlayerControllable(i, 1);
                SetCameraBehindPlayer(i);
                SpawnPlayer(i);
                TogglePlayerControllable(i,true);
                PlayerPlaySound(i, 1255, 0.0, 0.0, 0.0);
                TogglePlayerControllable(i,1);
 
                SetPlayerToTeamColor(i);
                SetPlayerVirtualWorld(i, 0);
                TogglePlayerSpectating(i, 0);
                PlayerInfo[pModel] = 250;
                AfterTutorial = 0;
                PlayerTextDrawHide(i, Step[0]);
                PlayerTextDrawHide(i, Step[1]);
                PlayerTextDrawHide(i, Step[2]);
                PlayerTextDrawHide(i, Step[3]);
                PlayerTextDrawHide(i, Step[4]);
                PlayerTextDrawHide(i, Step[5]);
                PlayerTextDrawHide(i, Step[6]);
                PlayerTextDrawHide(i, Step[7]);
                PlayerTextDrawHide(i, Step[8]);
                PlayerTextDrawHide(i, Tutorial);
            }
        }
        return 1;
    }
poftim
Link to comment
Share on other sites

Încearcă așa 

 					if(dialogid == DIALOG_SKIP)									    {									        if(IsPlayerConnected(playerid))									        {									            //foreach(Player,i)//aici e problema									            new i = playerid;									            if(TutTime >= 1) 				            { 	                TutTime = 99; PlayerInfo[pTut] = 1; 	                gOoc = 0; gNews = 0; gFam = 0; gRad = 0; gTeamFac = 0; gClChat = 0; 	                TogglePlayerControllable(i, 1); 	                SetCameraBehindPlayer(i); 	                SpawnPlayer(i); 	                TogglePlayerControllable(i,true); 	                PlayerPlaySound(i, 1255, 0.0, 0.0, 0.0); 	                TogglePlayerControllable(i,1); 	  	                SetPlayerToTeamColor(i); 	                SetPlayerVirtualWorld(i, 0); 	                TogglePlayerSpectating(i, 0); 	                PlayerInfo[pModel] = 250; 	                AfterTutorial = 0; 	                PlayerTextDrawHide(i, Step[0]); 	                PlayerTextDrawHide(i, Step[1]); 	                PlayerTextDrawHide(i, Step[2]); 	                PlayerTextDrawHide(i, Step[3]); 	                PlayerTextDrawHide(i, Step[4]); 	                PlayerTextDrawHide(i, Step[5]); 	                PlayerTextDrawHide(i, Step[6]); 	                PlayerTextDrawHide(i, Step[7]); 	                PlayerTextDrawHide(i, Step[8]); 	                PlayerTextDrawHide(i, Tutorial); 	            } 	        } 	        return 1; 	    }

 

Link to comment
Share on other sites

Guest story

E:\GM\gamemodes\bluffs.pwn(51972) : error 033: array must be indexed (variable "TutTime")
E:\GM\gamemodes\bluffs.pwn(51974) : error 033: array must be indexed (variable "TutTime")
E:\GM\gamemodes\bluffs.pwn(51974) : error 032: array index out of bounds (variable "PlayerInfo")
E:\GM\gamemodes\bluffs.pwn(51974) : error 033: array must be indexed (variable "PlayerInfo")
E:\GM\gamemodes\bluffs.pwn(51974) : fatal error 107: too many error messages on one line

Link to comment
Share on other sites

Salut, dute la: public OnPlayerCommandReceived(playerid, cmdtext[]) 

Si adauga asta: 

    if(TutTime[playerid] >= 1 || RegistrationStep[playerid] >= 1){
        if(strcmp(cmdtext, "/skip", true) == 0){}
        else return 0;
    }

Dupa oriunde in gamemode bagi asta: 

 

CMD:skip(playerid, params[]) {
    if(TutTime[playerid] >= 1) {
    TutTime[playerid] = 0; PlayerInfo[playerid][pTut] = 1;
    TogglePlayerControllable(playerid, 1);
    SetCameraBehindPlayer(playerid);
    TogglePlayerSpectating(playerid, 0);
    SetPlayerSpawn(playerid);
    SetPlayerInterior(playerid,0);
    ResetPlayerCash(playerid);
    GivePlayerCash(playerid,50000);
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid,0);
    TogglePlayerControllable(playerid,true);
    PlayerTextDrawHide(playerid, Tutorial[playerid]);
    PlayerTextDrawHide(playerid, Step[playerid]);
    new str1[256];
    mysql_format(SQL,str1,256,"UPDATE users SET Tutorial`='1',Bank`='50000',`Money`='0' WHERE `name`='%s'",PlayerInfo[playerid][pNormalName]);
    mysql_tquery(SQL,str1,"","");
    }
    else return SendClientMessage(playerid, -1, "Aceasta comanda  o poti folosi cand esti in tutorial.");
    return 1;
}

Sper ca ti-am fost de ajutor, Bafta.

============================================================================================================

Adel2 Scripter Hard-Play

RESPECTA SI VEI FI RESPECTAT!

Discord: Adel2#2586

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...