SA-MP Forums Archive
[AJUDA] Botгo do dialog - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [AJUDA] Botгo do dialog (/showthread.php?tid=224984)



[AJUDA] Botгo do dialog - [AF]Junior - 12.02.2011

Eu fiz uma gambiarra que funciona.

pawn Код:
#include <a_samp>

public OnPlayerCommandText( playerid, cmdtext[])
{
    if ( strcmp( cmdtext, "/kits", true)   == 0)
    {
    new nome[MAX_PLAYER_NAME];
    GetPlayerName(playerid,nome,sizeof(nome));
    new cooordstring[256+256+256+256],lstring[256] ;
    format( lstring, sizeof( lstring)  , "{FF0000}Kit 01 (digite /kit 01):{FFFFFF} 9MM Silenciosa, Shotgun, MP5, Rifle, Ak-47 e Taco de Baseball: {FF0000}($1500){FFFFFF}.\n");
    strcat( cooordstring,lstring)   ;
    format( lstring, sizeof( lstring)  , "{FF0000}Kit 02 (digite /kit 02):{FFFFFF} Desert Eagle, Combat Shotgun, Tec9, Sniper Rifle, M4 e Faca: {FF0000}($4000){FFFFFF}.\n");
    strcat( cooordstring,lstring)   ;
    format( lstring, sizeof( lstring)  , "{FF0000}Kit Especial (digite /kitespecial):{FFFFFF} Granada, Para-quedas e Serra Elйtrica: {FF0000}($15000){FFFFFF}.\n");
    strcat( cooordstring,lstring)   ;
    ShowPlayerDialog( playerid, 5222, DIALOG_STYLE_MSGBOX, "{FFFF00}Kits de Armas!", cooordstring, "Ok", "Fechar")   ;
    return 1;
    }
    return 0;
}
Eu digito /kits lб no servidor aн aparece tudo bonitйrrimo e tal. Tentei tirar esse Ok mas nem dб. Quero deixar apenas com 1 botгo.

Obrigado.


Re: [AJUDA] Botгo do dialog - Power_GamerX - 12.02.2011

pawn Код:
#include <a_samp>

public OnPlayerCommandText( playerid, cmdtext[])
{
    if ( strcmp( cmdtext, "/kits", true)   == 0)
    {
    new nome[MAX_PLAYER_NAME];
    GetPlayerName(playerid,nome,sizeof(nome));
    new cooordstring[256+256+256+256],lstring[256] ;
    format( lstring, sizeof( lstring)  , "{FF0000}Kit 01 (digite /kit 01):{FFFFFF} 9MM Silenciosa, Shotgun, MP5, Rifle, Ak-47 e Taco de Baseball: {FF0000}($1500){FFFFFF}.\n");
    strcat( cooordstring,lstring)   ;
    format( lstring, sizeof( lstring)  , "{FF0000}Kit 02 (digite /kit 02):{FFFFFF} Desert Eagle, Combat Shotgun, Tec9, Sniper Rifle, M4 e Faca: {FF0000}($4000){FFFFFF}.\n");
    strcat( cooordstring,lstring)   ;
    format( lstring, sizeof( lstring)  , "{FF0000}Kit Especial (digite /kitespecial):{FFFFFF} Granada, Para-quedas e Serra Elйtrica: {FF0000}($15000){FFFFFF}.\n");
    strcat( cooordstring,lstring)   ;
    ShowPlayerDialog( playerid, 5222, DIALOG_STYLE_MSGBOX, "{FFFF00}Kits de Armas!", cooordstring, "Fechar")   ;
    return 1;
    }
    return 0;
}
nunca tentei mais deve ser assim ^^


Re: [AJUDA] Botгo do dialog - [AF]Junior - 12.02.2011

Da warning e o botгo fica no lugar.


Re: [AJUDA] Botгo do dialog - Power_GamerX - 12.02.2011

?? como assim ?


Re: [AJUDA] Botгo do dialog - [AF]Junior - 12.02.2011

Fica igual e da um warning

pawn Код:
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\filterscripts\Kits.pwn(16) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.
Quero 1 botгo apenas.


Re: [AJUDA] Botгo do dialog - Power_GamerX - 12.02.2011

pawn Код:
#include <a_samp>

public OnPlayerCommandText( playerid, cmdtext[])
{
    if ( strcmp( cmdtext, "/kits", true)   == 0)
    {
    new nome[MAX_PLAYER_NAME];
    GetPlayerName(playerid,nome,sizeof(nome));
    new cooordstring[256+256+256+256],lstring[256] ;
    format( lstring, sizeof( lstring)  , "{FF0000}Kit 01 (digite /kit 01):{FFFFFF} 9MM Silenciosa, Shotgun, MP5, Rifle, Ak-47 e Taco de Baseball: {FF0000}($1500){FFFFFF}.\n");
    strcat( cooordstring,lstring)   ;
    format( lstring, sizeof( lstring)  , "{FF0000}Kit 02 (digite /kit 02):{FFFFFF} Desert Eagle, Combat Shotgun, Tec9, Sniper Rifle, M4 e Faca: {FF0000}($4000){FFFFFF}.\n");
    strcat( cooordstring,lstring)   ;
    format( lstring, sizeof( lstring)  , "{FF0000}Kit Especial (digite /kitespecial):{FFFFFF} Granada, Para-quedas e Serra Elйtrica: {FF0000}($15000){FFFFFF}.\n");
    strcat( cooordstring,lstring)   ;
    ShowPlayerDialog( playerid, 5222, DIALOG_STYLE_MSGBOX, "{FFFF00}Kits de Armas!", cooordstring, "", "Fechar")   ;
    return 1;
    }
    return 0;
}
se nao der agr eu nao sei ;S


Re: [AJUDA] Botгo do dialog - [AF]Junior - 12.02.2011

Jб tentei isso, o botгo fica simplesmente em branco...

Acho que sу dб 2 botхes mesmo.


Re: [AJUDA] Botгo do dialog - Macintosh - 12.02.2011

Acho que nгo tem como colocar apenas 1 botгo em uma dialog...
Vocк pode colocar Ok e Ok ou Fechar e Fechar...
Os dois iriam executar a mesma perfomance.


Re: [AJUDA] Botгo do dialog - Baddark2131 - 12.02.2011

Aff sabe nem usar strcat.
E ainda robo meus creditos por que voce pego o meu DialogStatus.
Nгo use strcat , para fazer para 'descer' uma linha apenas coloque "\n" no local para fazer outra linha --'


Re: [AJUDA] Botгo do dialog - [AF]Junior - 12.02.2011

Que crйditos? Sу baixei normal...

Se tivesse crйditos no filterscript eu deixava, mas como nгo tinha... '-'