[Ajuda] erros
#1

PHP код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#if defined FILTERSCRIPT
new event;
new 
Inevent;
public 
OnFilterScriptInit()
{
    print(
"\n--------------------------------------");
    print(
"Filter Script Event By Gabrielloko157 =D");
    print(
"--------------------------------------\n");
    return 
1;
}
public 
OnFilterScriptExit()
{
    return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
    if(!
strcmp(cmdtext"/criarevento"true))
    {
    for(new 
i=0iMAX_PLAYERSi++)
    {
         
ShowPlayerDialog(i,1923,DIALOG_STYLE_MSGBOX,"Evento Paintball","O Admin %s estб chamando todos Para um\n Evento de Paintball\n Vocк Deseja ir ?","Sim","Nгo");
    }
    }
    return 
0;
}
public 
OnPlayerDeath(playeridkilleridreason)
{
    {
        if(
Inevent == 1)
        {
        
SetPlayerPos(playerid,0.0,0.0,3.0);
        }
        
#endif
    
}
    return 
1;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
if(
dialogid == 1923){
    if(
response){
    
SetPlayerPos(playerid,0.0,0.0,3.0);
    
Inevent 1;
    }
    else{
    }
}
    return 
0// You MUST return 0 here! Just like OnPlayerCommandText.


eu to fazendo esse fs mais deu alguns erros alguem sabe o que pode ser ?
Reply
#2

pawn Код:
#include <a_samp>

new bool:emEvento[MAX_PLAYERS];

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/criarevento", true))
    {
        if(!IsPlayerAdmin(playerid)) return 0x00;

        static nome[21], fstring[79];
        GetPlayerName(playerid, nome, 21);
        format(fstring, 79 + 21, "O Admin %s estб chamando todos Para um\n Evento de Paintball\n Vocк Deseja ir ?", nome);

        for(new ii, xx = GetMaxPlayers(); ii != xx; ii++)
        {
            if(ii == playerid || !IsPlayerConnected(ii) /* || sua var de login == false */) continue;
            ShowPlayerDialog(ii, 1923, DIALOG_STYLE_MSGBOX, "Evento Paintball", fstring, "Sim", "Nгo");
        }
        return 0x01;
    }
    return 0;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1923)
    {
        if(response)
        {
            emEvento[playerid] = true;
            SetPlayerPos(playerid,0.0,0.0,3.0);
        }
    }
    return 1;
}
para que esse SetPlayerPos em OnPlayerDeath o.х ?...
Reply
#3

pawn Код:
#include <a_samp>


new event;
new Inevent;



public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print("Filter Script Event By Gabrielloko157 =D");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}


public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/criarevento", true))
    {
       for(new i=0; i< MAX_PLAYERS; ++i)
       {
            ShowPlayerDialog(i,1923,DIALOG_STYLE_MSGBOX,"Evento Paintball","O Admin %s estб chamando todos Para um\n Evento de Paintball\n Vocк Deseja ir ?","Sim","Nгo");
       }
       return true;
    }
    return false;
}


public OnPlayerDeath(playerid, killerid, reason)
{
        if(Inevent == 1)
        {
             SetPlayerPos(playerid,0.0,0.0,3.0);
        }
        return 1;
}


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
     if(dialogid == 1923){
          if(response){
                SetPlayerPos(playerid,0.0,0.0,3.0);
                Inevent = 1;
          }
    }
    return true;
}
Reply
#4

o Inevent identifica se ele foi pro evento, sendo assim se ele morrer ele volta pro evento
e o evento so vai fechar quando eu pedir =D

do Jhonathan deu Certo =D


ah e eu to com uma duvida,
como eu pego o id dos caras que foram pro evento e depois dar spaw so em quem tava no evento?

Usa o GetPlayerId e como eu vou dar respaw so em quem foi pro evento com um comando?
Reply
#5

cara, quando morre nгo tem como setar posiзгo... voce simplesmente spawna novamente na posiзгo definida em AddPlayerClass ou SetSpawnInfo...

tanto o que voce postou antes quanto esse ai agora nao vai funcionar... voce estб usando uma unica variavel para todos os jogadores...


Ao menos de atenзгo ao que eu fiz e compare com o seu que notarб a diferenзa...
Reply
#6

Falcon, mais tem como eu usar addplayerclass usando a if Inevent ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)