[Ajuda] Criaзгo de Hold's
#1

BOM GALERA EU BAIXEI UM FS QUE CRIA HOLDS JA TENHO ELE MAIS NAO SEI COMO POR NO GM ALGUEM PODERIA ME AJUDAR?
QUERO POR ELES E FAZER UM COMANDO TIPO ASSIM /M4 FICA A M4 NAS COSTAS DO PLAYER E ETC..
Reply
#2

Quando vocк Cria o objeto e salva ele aparece num arquivo na ScriptFiles ai tu abre copia o cуdigo e cola no cmd
Reply
#3

tipo mano vocк pode me ajudar a fazer isso em dialog list? quando o player clica ja cria a hold nele .. +REP!
Reply
#4

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1000)
    {
        if(response)
        {
                if(listitem == 0)
                {
                    //aki й o 1 da lista q й a M4. coleque o cod de colocar nas costas.
                }
                if(listitem == 1)
                {
                    //aki й o 2 da lista e assim por diante.
                }
        }
        else
        {
            // coloque o code para retirar a arma das costas
        }
    }
}
No cmd coloque isso.
pawn Код:
new listitems[] = "M4\nMP5\nEAGLE"; //quantos vc deseja na lista
    ShowPlayerDialog(playerid,1000,DIALOG_STYLE_LIST,"Armas nas Costas",listitems,"Colocar","Retirar");
Reply
#5

mano vo mandar o que fiz ai tu arruma? te do a rep ta ai :

Код:
//------------------------------------------------------------------------------
if (strcmp(cmdtext, "/oclarao", true) == 0)
{
     SetPlayerAttachedObject( playerid, 0, 354, 1, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 );
	 return 1;
}
//------------------------------------------------------------------------------
if (strcmp(cmdtext, "/om4", true) == 0)
{
     SetPlayerAttachedObject( playerid, 0, 356, 1, -0.109213, -0.158438, 0.110446, 190.443313, 0.000000, 0.000000, 1.106521, 1.000000, 1.333984 );
     return 1;
}
//------------------------------------------------------------------------------
if (strcmp(cmdtext, "/obazuka", true) ==0)
{
     SetPlayerAttachedObject( playerid, 0, 359, 1, -0.386748, 0.972680, -0.063896, 24.633762, 87.499031, 65.763282, 1.054929, 1.000000, 1.242258 );
     return 1;
}
//------------------------------------------------------------------------------
Reply
#6

pawn Код:
//comando:

new hold = "1\tClarao\n2\tM4\n3\tBazuka";
ShowPlayerDialog(playerid,1000,DIALOG_STYLE_LIST,"Hold",hold,"Colocar","Cancelar");


//dialog response

if(dialogid == 1000)
{
if(response)
{
    switch(listitem)
    {
    case 0: {SetPlayerAttachedObject( playerid, 0, 354, 1, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 ); }
    case 1: {SetPlayerAttachedObject( playerid, 0, 356, 1, -0.109213, -0.158438, 0.110446, 190.443313, 0.000000, 0.000000, 1.106521, 1.000000, 1.333984 ); }
    case 2: {SetPlayerAttachedObject( playerid, 0, 359, 1, -0.386748, 0.972680, -0.063896, 24.633762, 87.499031, 65.763282, 1.054929, 1.000000, 1.242258 ); }
    }
}
}
:P
Reply
#7

fiz igual vc mandou ..
deu erro nessa linhas abaixo ↓
Код:
if (strcmp(cmdtext, "/ac", true) ==0)
{
     new hold = "1\tClarao\n2\tM4\n3\tBazuka";
     ShowPlayerDialog(playerid,1000,DIALOG_STYLE_LIST,"Hold",hold,"Colocar","Cancelar");
     return 1;
}
Код:
C:\Documents and Settings\Lucas ®\Desktop\B4S\gamemodes\B4S.pwn(484) : error 033: array must be indexed (variable "-unknown-")
C:\Documents and Settings\Lucas ®\Desktop\B4S\gamemodes\B4S.pwn(485) : error 035: argument type mismatch (argument 5)
C:\Documents and Settings\Lucas ®\Desktop\B4S\gamemodes\B4S.pwn(484) : warning 204: symbol is assigned a value that is never used: "hold"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#8

acho que vou deixar no comando mesmo ... so ponho um comando exemplo /ac digite /m4 /bazuka ... oq acha red?
Reply
#9

eu errei coloque new hold[]
entra skype.
Reply
#10

pawn Код:
if (strcmp(cmdtext, "/armasnacostas", true) == 0)
{
    new listitems[] = "Clarao\nM4\nBazuka";
    ShowPlayerDialog(playerid,1000,DIALOG_STYLE_LIST,"Armas nas Costas",listitems,"Colocar","Retirar");
}
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1000)
    {
        if(response)
        {
            if(listitem == 0)
            {
                SetPlayerAttachedObject( playerid, 0, 354, 1, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 );
            }
            if(listitem == 1)
            {
                SetPlayerAttachedObject( playerid, 0, 356, 1, -0.109213, -0.158438, 0.110446, 190.443313, 0.000000, 0.000000, 1.106521, 1.000000, 1.333984 );
            }
            if(listitem == 2)
            {
                SetPlayerAttachedObject( playerid, 0, 359, 1, -0.386748, 0.972680, -0.063896, 24.633762, 87.499031, 65.763282, 1.054929, 1.000000, 1.242258 );
            }
        }
        else
        {
            RemovePlayerAttachedObject(playerid, 0);
        }
    }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)