[Ajuda] /x1 id id
#17

Quote:
Originally Posted by helpmesamp
Посмотреть сообщение
Olб,eu faзo evento evento de x1 no meu serve dm
mas queri um cmd ex: /x1 id id dai dava eagle shot e sniper para cada um deles e colete e vida 100#
onde tem que setar eles:
o primeiro:
1409.1548,-16.9953,1000.9227,93.2642
o outro
1365.4105,-19.6422,1000.9219,272.5929
Criei um aqui, /x1 convidar
http://imgur.com/a/3R0Tb
PHP код:
#include <a_samp>
#include <sscanf>
#include <ZCMD>
new Player1[MAX_PLAYERS], Player2[MAX_PLAYERS];
CMD:x1(playerid,params[])
{
    new 
tipo;
    if(
sscanf(params"s"tipo)) return SendClientMessage(playerid, -1"[ ERROR ] >> /x1 [convidar]");
    
ShowPlayerDialog(playerid101DIALOG_STYLE_INPUT"Duelo de x1""Insira o id do player:""Enviar""");
    return 
1;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == 100)
    {
        new 
id;
        if(
response)
        {
            
id strval(inputtext);
            if(!
IsPlayerConnected(id)) return SendClientMessage(playerid, -1"[ ERROR ] » Nenhuma pessoa online com esse ID");
            {
                   new 
str[128], anome[MAX_PLAYER_NAME], pnome[MAX_PLAYER_NAME]; 
                   
GetPlayerName(playeridpnomesizeof(pnome)); GetPlayerName(idanomesizeof(anome));
                   
format(strsizeof(str), "Olб %s eu %s estou de convidando pra um duelo de x1\nAceita ou recusa?"anomepnome);
                   
ShowPlayerDialog(id101DIALOG_STYLE_MSGBOX"Duelo de x1"str"Aceitar""recusar");
                   
Player1[playerid] = playerid;
                   
Player2[id] = id;
            }
        }
    }
    if(
dialogid == 101)
    {
        if(!
response)
        {
            new 
nome[MAX_PLAYER_NAME]; new str[128];
            
GetPlayerName(playeridnomesizeof(nome));
            
format(strsizeof(str), "[DUELO] >> O jogador %s recusou seu convite de x1"nome);
            
ShowPlayerDialog(Player1[playerid], 201DIALOG_STYLE_MSGBOX"DUELO"str"Ok""");
        }
        else
        {
            
SetTimerEx("StartDuelo"50000,false"ii",Player1[playerid],Player2[playerid]);
        }
    }
    return 
1;
}
forward StartDuelo(p1p2);
public 
StartDuelo(p1p2)
{
    static 
10//para quando outro usar o comando nao ir pro msm canto que ja tem 1, a cada luta ira troca o virtual world, ai quadno acaba luta tu cria funзгo pra retorna ao 0
    //SetPlayerPos(p1, x,y,z); voce pode deixa o msm lugar pra todos os players, cada 2 estбra em mundos diferentes!
    //SetPlayerPos(p2, x,y,z); 
    
SetPlayerPos(p11409.1548,-16.9953,1000.9227); //os lugar que vocк pedio
    
SetPlayerPos(p21365.4105,-19.6422,1000.9219);
    
//aqui tu seta as armas
    
new str[128]; new nome1[MAX_PLAYER_NAME], nome2[MAX_PLAYER_NAME]; 
    
GetPlayerName(p1nome1sizeof(nome1)); GetPlayerName(p2nome2sizeof(nome2));
    
format(strsizeof(str), "O jogador %s estб em um duelo contra o jogador %s"nome1nome2);
   
    
SetPlayerInterior(p10);
    
SetPlayerInterior(p20);
    
SetPlayerVirtualWorld(p1w); //tipo os primeiros a usar esse comando de duelo ira epga o virtual mundo 10 e os outro 11  e assim por diante para que nao atrapalhe
    
SetPlayerVirtualWorld(p2w);
    
w++;
    return 
1;

/evento
ja posto o evento, to criando!
Reply


Messages In This Thread
/x1 id id - by helpmesamp - 13.07.2017, 17:16
Re: /x1 id id - by Jonorusc - 13.07.2017, 18:08
Re: /x1 id id - by s4kuL - 13.07.2017, 18:50
Re: /x1 id id - by MtPlayerZ - 13.07.2017, 19:02
Re: /x1 id id - by s4kuL - 13.07.2017, 19:08
Re: /x1 id id - by helpmesamp - 13.07.2017, 23:41
Re: /x1 id id - by helpmesamp - 13.07.2017, 23:51
Re: /x1 id id - by ayoub12 - 14.07.2017, 00:16
Re: /x1 id id - by helpmesamp - 14.07.2017, 02:15
Re: /x1 id id - by helpmesamp - 14.07.2017, 02:48
Re: /x1 id id - by MtPlayerZ - 14.07.2017, 14:03
Re: /x1 id id - by helpmesamp - 14.07.2017, 15:01
Re: /x1 id id - by s4kuL - 14.07.2017, 19:36
Re: /x1 id id - by helpmesamp - 15.07.2017, 00:17
Re: /x1 id id - by ThiagoMikael - 15.07.2017, 11:43
Re: /x1 id id - by Jonorusc - 15.07.2017, 11:51
Re: /x1 id id - by Jonorusc - 15.07.2017, 13:28
Re: /x1 id id - by Jonorusc - 15.07.2017, 14:14
Re: /x1 id id - by ThiagoMikael - 15.07.2017, 14:19
Re: /x1 id id - by helpmesamp - 15.07.2017, 14:55

Forum Jump:


Users browsing this thread: 3 Guest(s)