[AJUDA]Pickup Apertando F -
Nake01 - 28.06.2011
Galera criei um pickup aqui e tals mais quando aperto F nгo apareзe a Dialog
PHP код:
ShowPlayerDialog(playerid, InfoGat, DIALOG_STYLE_LIST, "Informaзхes do GAT", "Ver Meus Comandos", "Selecionar", "Sair");
Usei assim
PHP код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys == KEY_SECONDARY_ATTACK)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, -1605.4955,712.0432,13.8672))
{
ShowPlayerDialog(playerid, InfoGat, DIALOG_STYLE_LIST, "Informaзхes do GAT", "Ver Meus Comandos", "Selecionar", "Sair");
}
}
return 1;
}
Sу que queria quando clica-se em ver meus comando aparecia essa MSGBOX
PHP код:
ShowPlayerDialog(playerid, InfoGat+1, DIALOG_STYLE_MSGBOX, "[ COMANDOS GAT ]","Comandos GAT [Level 1] (Recruta): /dpgat, /gat, /apgat, /fpgat, /su\r\nComandos GAT [Level 2] (Soldado): /ofc, /prender, /abordar, /revistar, /desabordar\r\nComandos GAT [Level 3] (Capitгo): /ir, /trazer", "Ok", "Sair");
// Preste Atenзгo nas ' Listas '. List 1 ( Corrida 1 ) List 2 ( Corrida 2 )
Como faзo ?
Re: [AJUDA]Pickup Apertando F -
Shadoww5 - 28.06.2011
PHP код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == (InfoGat))
{
if(response) return ShowPlayerDialog(playerid, InfoGat+1, DIALOG_STYLE_MSGBOX, "[ COMANDOS GAT ]","Comandos GAT [Level 1] (Recruta): /dpgat, /gat, /apgat, /fpgat, /su\r\nComandos GAT [Level 2] (Soldado): /ofc, /prender, /abordar, /revistar, /desabordar\r\nComandos GAT [Level 3] (Capitгo): /ir, /trazer", "Ok", "Sair");
}
return 1;
}
Re: [AJUDA]Pickup Apertando F -
Josma_cmd - 28.06.2011
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == InfoGat)
{
if(response)
{
if(listitem == 0)
{
ShowPlayerDialog(playerid, InfoGat+1, DIALOG_STYLE_MSGBOX, "[ COMANDOS GAT ]","Comandos GAT [Level 1] (Recruta): /dpgat, /gat, /apgat, /fpgat, /su\r\nComandos GAT [Level 2] (Soldado): /ofc, /prender, /abordar, /revistar, /desabordar\r\nComandos GAT [Level 3] (Capitгo): /ir, /trazer", "Ok", "Sair");
return 1;
}
}
return 1;
}
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys == KEY_SECONDARY_ATTACK)
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, -1605.4955,712.0432,13.8672))
{
ShowPlayerDialog(playerid, InfoGat, DIALOG_STYLE_LIST, "Informaзхes do GAT", "Ver Meus Comandos", "Selecionar", "Sair");
return 1;
}
}
return 1;
}
Re: [AJUDA]Pickup Apertando F -
The Knight - 28.06.2011
O nome da tecla estб correta?
Re: [AJUDA]Pickup Apertando F -
Nake01 - 28.06.2011
Josma quando aperto F nгo abre a dialog :@
Re: [AJUDA]Pickup Apertando F -
The Knight - 28.06.2011
PHP код:
public OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
{
#define PRESSED( %0 ) \
( ( ( newkeys & ( %0 ) ) == ( %0 ) ) && ( ( oldkeys & ( %0 ) ) != ( %0 ) ) )
if( PRESSED( KEY_SECONDARY_ATTACK )
{
if( IsPlayerInRangeOfPoint( playerid, 2.0, -1605.4955, 712.0432, 13.8672 ) )
{
ShowPlayerDialog( playerid, InfoGat, DIALOG_STYLE_LIST, "Informaзхes do GAT", "Ver Meus Comandos", "Selecionar", "Sair");
}
}
return true;
}
Agora a funзгo de quando clica nos botхes:
PHP код:
public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[] )
{
if( dialogid == InfoGat )
{
if( !response ) return SendClientMessage( playerid, 0xFFF000AA, "Vocк optou por sair!" );
if( listitem == 0 )
{
new sStr[ 256 ];
strcat( sStr, "Comandos GAT [Level 1] (Recruta): /dpgat, /gat, /apgat, /fpgat, /su\n" );
strcat( sStr, "Comandos GAT [Level 2] (Soldado): /ofc, /prender, /abordar, /revistar, /desabordar\n" );
strcat( sStr, "Comandos GAT [Level 3] (Capitгo): /ir, /trazer" );
ShowPlayerDialog( playerid, InfoGat+1, DIALOG_STYLE_MSGBOX, "[ COMANDOS GAT ]", sStr, "Ok", "Sair" );
}
return true;
}
return false;
}
Re: [AJUDA]Pickup Apertando F -
Nake01 - 30.06.2011
DEU ESSES ERROS AQUI
PHP код:
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor GTE\filterscripts\FS.pwn(2554) : warning 236: unknown parameter in substitution (incorrect #define pattern)
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor GTE\filterscripts\FS.pwn(2554) : warning 236: unknown parameter in substitution (incorrect #define pattern)
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor GTE\filterscripts\FS.pwn(2554) : warning 236: unknown parameter in substitution (incorrect #define pattern)
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor GTE\filterscripts\FS.pwn(2554) : warning 236: unknown parameter in substitution (incorrect #define pattern)
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor GTE\filterscripts\FS.pwn(2554) : warning 236: unknown parameter in substitution (incorrect #define pattern)
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor GTE\filterscripts\FS.pwn(2554) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor GTE\filterscripts\FS.pwn(2554) : warning 215: expression has no effect
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor GTE\filterscripts\FS.pwn(2554) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor GTE\filterscripts\FS.pwn(2554) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor GTE\filterscripts\FS.pwn(2554) : fatal error 107: too many error messages on one line
Re: [AJUDA]Pickup Apertando F -
Macintosh - 30.06.2011
Linha?
Re: [AJUDA]Pickup Apertando F -
Nake01 - 30.06.2011
Linha 2554
Код:
if(PRESSED( KEY_SECONDARY_ATTACK)
Re: [AJUDA]Pickup Apertando F - rjjj - 30.06.2011
Quote:
Originally Posted by Nake01
Linha 2554
Код:
if(PRESSED( KEY_SECONDARY_ATTACK)
|
Basta fechar mais um parкntese no final da linha, ficando deste modo
:
Код:
if( PRESSED( KEY_SECONDARY_ATTACK ) )
Espero ter ajudado
.