28.06.2011, 23:11
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;
}
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;
}