SA-MP Forums Archive
[Ajuda] o Que tem de errado?? - 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] o Que tem de errado?? (/showthread.php?tid=360753)



o Que tem de errado?? - Lukinhas_Ice - 18.07.2012

PHP код:
#include <a_samp>
#define Click 789
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if (
dialogid == Click) {
            new 
string[256];
            if (
response == 1) {                 
                new 
nome[24];
                
GetPlayerName(playeridnomeMAX_PLAYER_NAME);
                
format(stringsizeof(string), "{FFFF00}%s \n {33AA33}Ping: {FFFFFF}%d {33AA33}FPS: {FFFFFF}%d "nomeGetPlayerPing(playerid), GetPlayerFPS(playerid));
                
ShowPlayerDialog(playeridClickDIALOG_STYLE_MSGBOX"Informaзхes"string"Refresh""Cancelar");
            }
        }
    return 
1;
    }
public 
OnPlayerClickPlayer(playeridclickedplayeridsource) {
        new 
string[256];
        
format(stringsizeof(string), "{33AA33}Ping: {FFFFFF}%d {33AA33}FPS: {FFFFFF}%d "GetPlayerPing(playerid), GetPlayerFPS(playerid));
        
ShowPlayerDialog(playeridClickDIALOG_STYLE_MSGBOX"Informaзхes"string"Refresh""Cancelar");
        return 
1;
    }
stock GetPlayerFPS(playerid) {
        
SetPVarInt(playerid"DrunkL"GetPlayerDrunkLevel(playerid));
        if(
GetPVarInt(playerid"DrunkL") < 100SetPlayerDrunkLevel(playerid2000);
        else {
            if(
GetPVarInt(playerid"LDrunkL") != GetPVarInt(playerid"DrunkL")) {
                
SetPVarInt(playerid"FPS", (GetPVarInt(playerid"LDrunkL") - GetPVarInt(playerid"DrunkL")));
                
SetPVarInt(playerid"LDrunkL"GetPVarInt(playerid"DrunkL"));
                if((
GetPVarInt(playerid"FPS") > 0) && (GetPVarInt(playerid"FPS") < 256)) {
                    return 
GetPVarInt(playerid"FPS") - 1;
                }
            }
        }
        return 
0;
    } 
estou tentando colocar em FS, mais quando entro no servidor nгo da Load no FS


Re: o Que tem de errado?? - .FuneraL. - 18.07.2012

Tente por isto no topo.

pawn Код:
#define FILTERSCRIPT
#if defined FILTERSCRIPT
#endif



Re: o Que tem de errado?? - _.MeT4L._ - 18.07.2012

PHP код:
public OnPlayerClickPlayer(playeridclickedplayeridsource) { 
        new 
string[256]; 
        
format(stringsizeof(string), "{33AA33}Ping: {FFFFFF}%d {33AA33}FPS: {FFFFFF}%d "GetPlayerPing(playerid), GetPlayerFPS(playerid)); 
        
ShowPlayerDialog(playeridClickDIALOG_STYLE_MSGBOX"Informaзхes"string"Refresh""Cancelar"); 
        return 
1
    } 
AKI em cima ^^ Seu codigo mostra o ping e o Fps seu, nгo o da pessoa que voce clickou.
PHP код:
public OnPlayerClickPlayer(playeridclickedplayeridsource) { 
        new 
string[256]; 
        
format(stringsizeof(string), "{33AA33}Ping: {FFFFFF}%d {33AA33}FPS: {FFFFFF}%d "GetPlayerPing(clickedplayerid), GetPlayerFPS(clickedplayerid)); 
        
ShowPlayerDialog(playeridClickDIALOG_STYLE_MSGBOX"Informaзхes"string"Refresh""Cancelar"); 
        return 
1
    }
// certo 



Re: o Que tem de errado?? - Lukinhas_Ice - 18.07.2012

foi valeu, mais agora quando clica no "botгo Refresh" nгo atualiza, no gm que eu to fazendo funciona =S


Re: o Que tem de errado?? - _.MeT4L._ - 18.07.2012

tipo bote "fechar" atualizar basta clickar dnovo'-


Re: o Que tem de errado?? - Lukinhas_Ice - 18.07.2012

no meu gm quando clica no "botгo" ele aparecia o dialog novamente, mais no fs nгo vai assim, nгo sei por que =S


Re: o Que tem de errado?? - _.MeT4L._ - 18.07.2012

tipo voce colocou um response para akele dialog de clickar certo?

Mais na OnPlayerdialogresponse nгo tem Clickedplayerid.
apenas tire o response ou arrume ele .
para outra coisa.