[Ajuda] Sistema de Tutorial
#1

Ola Galerinha
to comeзando criar meu gamemod do 0 por esta base
https://sampforum.blast.hk/showthread.php?tid=339743
vai ser em las venturas eu queria saber como fazer um sistema de tutorial descupa pelo encomodo e porque eu n achei aki usando o site:forum.sa-mp.com do ******
obrigado para quem me ajudar vou criar o gm em base DOF2
Reply
#2

Se estiver falande de um tutorial apуs se registrar, veja esse tуpico.

https://sampforum.blast.hk/showthread.php?tid=523613&page=2
Reply
#3

Poderia me passar uma base pra conhecimento e aplicar os textos etc ?
Reply
#4

Certo aqui estб.

pawn Код:
#define DIALOG_TUT    1000

Tente na public OnPlayerSpawn..

 ShowPlayerDialog(playerid, DIALOG_TUT, DIALOG_STYLE_MSGBOX, "Tutorial", " seu tutorial.. ", "Continuar", "Cancelar");


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_TUT)
    {
        if(response) // clicou Continuar
        {
            SendClientMessage(playerid, SUA_COR, "Obrigado por ler o tutorial!");
        }
        else //  deu esc ou clicou cancelar..
        {
            KickWithMessage(playerid, SUA_COR, "Vocк precisa ler o tutorial primeiro para jogar.");
           
        }
        return 1;
    }
 
    return 0;
}
Espero que tenha entendido..
Reply
#5

Coloco Onde ?
PHP код:
public OnPlayerSpawn(playerid)
{
    
LogarProf(playerid);
        
TextDrawHideForPlayer(playeridImagemConnect);
        
TextDrawHideForPlayer(playeridBemVindo);
        if(
Preso[playerid] == 1)
        {
                if(
GetPlayerWantedLevel(playerid) == 1)
                {
                        
SetPlayerInterior(playerid6);
                        
Assalto[playerid] = 0;
                
Preso[playerid] = 1;
                
GameTextForPlayer(playerid"~w~PRESO!"30000);
                
SetPlayerPos(playerid264.599677.73671001.0391);
                
TempoPreso[playerid] = SetTimerEx("Liberar"120000false"i"playerid);
                
ResetPlayerWeapons(playerid);
                }
                else if(
GetPlayerWantedLevel(playerid) == 2)
                {
                        
SetPlayerInterior(playerid6);
                        
Assalto[playerid] = 0;
                
Preso[playerid] = 1;
                
GameTextForPlayer(playerid"~w~PRESO!"30000);
                
SetPlayerPos(playerid264.599677.73671001.0391);
                
TempoPreso[playerid] = SetTimerEx("Liberar"240000false"i"playerid);
                
ResetPlayerWeapons(playerid);
                }
                else if(
GetPlayerWantedLevel(playerid) == 3)
                {
                        
SetPlayerInterior(playerid6);
                        
Assalto[playerid] = 0;
                        
Preso[playerid] = 1;
                        
GameTextForPlayer(playerid"~w~PRESO!"30000);
                        
SetPlayerPos(playerid264.599677.73671001.0391);
                        
TempoPreso[playerid] = SetTimerEx("Liberar"480000false"i"playerid);
                        
ResetPlayerWeapons(playerid);
                }
                else if(
GetPlayerWantedLevel(playerid) == 4)
                {
                        
SetPlayerInterior(playerid6);
                        
Assalto[playerid] = 0;
                
Preso[playerid] = 1;
                
GameTextForPlayer(playerid"~w~PRESO!"30000);
                
SetPlayerPos(playerid264.599677.73671001.0391);
                
TempoPreso[playerid] = SetTimerEx("Liberar"600000false"i"playerid);
                
ResetPlayerWeapons(playerid);
                }
                else if(
GetPlayerWantedLevel(playerid) == 5)
                {
                        
SetPlayerInterior(playerid6);
                        
Assalto[playerid] = 0;
                    
Preso[playerid] = 1;
                    
GameTextForPlayer(playerid"~w~PRESO!"30000);
                        
SetPlayerPos(playerid264.599677.73671001.0391);
                
TempoPreso[playerid] = SetTimerEx("Liberar"720000false"i"playerid);
                
ResetPlayerWeapons(playerid);
                }
                else if(
GetPlayerWantedLevel(playerid) == 6)
                {
                        
SetPlayerInterior(playerid6);
                        
Assalto[playerid] = 0;
                
Preso[playerid] = 1;
                
GameTextForPlayer(playerid"~w~PRESO!"30000);
                
SetPlayerPos(playerid264.599677.73671001.0391);
                        
TempoPreso[playerid] = SetTimerEx("Liberar"840000false"i"playerid);
                
ResetPlayerWeapons(playerid);
                }
        }
        return 
1;

Reply
#6

Tenta ai.. falta colocar seus nomes e tal..

pawn Код:
public OnPlayerSpawn(playerid)
{

  ShowPlayerDialog(playerid, DIALOG_TUT, DIALOG_STYLE_MSGBOX, "Tutorial", " seu tutorial.. ", "Continuar", "Cancelar");

   LogarProf(playerid);
        TextDrawHideForPlayer(playerid, ImagemConnect);
        TextDrawHideForPlayer(playerid, BemVindo);
        if(Preso[playerid] == 1)
        {
                if(GetPlayerWantedLevel(playerid) == 1)
                {
                        SetPlayerInterior(playerid, 6);
                        Assalto[playerid] = 0;
                Preso[playerid] = 1;
                GameTextForPlayer(playerid, "~w~PRESO!", 3000, 0);
                SetPlayerPos(playerid, 264.5996, 77.7367, 1001.0391);
                TempoPreso[playerid] = SetTimerEx("Liberar", 120000, false, "i", playerid);
                ResetPlayerWeapons(playerid);
                }
                else if(GetPlayerWantedLevel(playerid) == 2)
                {
                        SetPlayerInterior(playerid, 6);
                        Assalto[playerid] = 0;
                Preso[playerid] = 1;
                GameTextForPlayer(playerid, "~w~PRESO!", 3000, 0);
                SetPlayerPos(playerid, 264.5996, 77.7367, 1001.0391);
                TempoPreso[playerid] = SetTimerEx("Liberar", 240000, false, "i", playerid);
                ResetPlayerWeapons(playerid);
                }
                else if(GetPlayerWantedLevel(playerid) == 3)
                {
                        SetPlayerInterior(playerid, 6);
                        Assalto[playerid] = 0;
                        Preso[playerid] = 1;
                        GameTextForPlayer(playerid, "~w~PRESO!", 3000, 0);
                        SetPlayerPos(playerid, 264.5996, 77.7367, 1001.0391);
                        TempoPreso[playerid] = SetTimerEx("Liberar", 480000, false, "i", playerid);
                        ResetPlayerWeapons(playerid);
                }
                else if(GetPlayerWantedLevel(playerid) == 4)
                {
                        SetPlayerInterior(playerid, 6);
                        Assalto[playerid] = 0;
                Preso[playerid] = 1;
                GameTextForPlayer(playerid, "~w~PRESO!", 3000, 0);
                SetPlayerPos(playerid, 264.5996, 77.7367, 1001.0391);
                TempoPreso[playerid] = SetTimerEx("Liberar", 600000, false, "i", playerid);
                ResetPlayerWeapons(playerid);
                }
                else if(GetPlayerWantedLevel(playerid) == 5)
                {
                        SetPlayerInterior(playerid, 6);
                        Assalto[playerid] = 0;
                    Preso[playerid] = 1;
                    GameTextForPlayer(playerid, "~w~PRESO!", 3000, 0);
                        SetPlayerPos(playerid, 264.5996, 77.7367, 1001.0391);
                TempoPreso[playerid] = SetTimerEx("Liberar", 720000, false, "i", playerid);
                ResetPlayerWeapons(playerid);
                }
                else if(GetPlayerWantedLevel(playerid) == 6)
                {
                        SetPlayerInterior(playerid, 6);
                        Assalto[playerid] = 0;
                Preso[playerid] = 1;
                GameTextForPlayer(playerid, "~w~PRESO!", 3000, 0);
                SetPlayerPos(playerid, 264.5996, 77.7367, 1001.0391);
                        TempoPreso[playerid] = SetTimerEx("Liberar", 840000, false, "i", playerid);
                ResetPlayerWeapons(playerid);
                }
        }
        return 1;
}
Reply
#7

Deu Esses Erros
PHP код:
C:\Users\User\Desktop\BETA\Beta\gamemodes\lv.pwn(509) : warning 217loose indentation
C
:\Users\User\Desktop\BETA\Beta\gamemodes\lv.pwn(509) : error 029invalid expressionassumed zero
C
:\Users\User\Desktop\BETA\Beta\gamemodes\lv.pwn(509) : error 017undefined symbol "dialogid"
C:\Users\User\Desktop\BETA\Beta\gamemodes\lv.pwn(511) : error 017undefined symbol "dialogid"
C:\Users\User\Desktop\BETA\Beta\gamemodes\lv.pwn(513) : error 017undefined symbol "response"
C:\Users\User\Desktop\BETA\Beta\gamemodes\lv.pwn(515) : error 017undefined symbol "SUA_COR"
C:\Users\User\Desktop\BETA\Beta\gamemodes\lv.pwn(519) : error 017undefined symbol "KickWithMessage"
C:\Users\User\Desktop\BETA\Beta\gamemodes\lv.pwn(527) : warning 225unreachable code
C
:\Users\User\Desktop\BETA\Beta\gamemodes\lv.pwn(527) : warning 217loose indentation
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase 
Reply
#8

Corrija os erros de identaзгo, vocк tambйm nгo definiu sua cor ._.

pawn Код:
#define SUA_COR   0xFFFFFFF

No final do GM..

pawn Код:
stock KickWithMessage(playerid, color, message[])
 {
 SendClientMessage(playerid, color, message);
 SetTimerEx("KickPublic", 1000, 0, "d", playerid);
 }

 forward KickPublic(playerid);
 public KickPublic(playerid) { Kick(playerid)}
Poste as linhas dos erros..
Reply
#9

Obrigado
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)