Help Me?
#1

Help me?
What's wrong here?
pawn Код:
CMD:infos(playerid, params[])
{
    new JUIP[50], NomeJU[30], StrJU[128], targetid, InfosDlg[9999];
    GetPlayerName(targetid, NomeJU, sizeof(NomeJU));
    GetPlayerIp(playerid, JUIP, sizeof(JUIP));
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}Nick:{00ff00} %s\n", InfosDlg, NomeJU);
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}Level:{00ff00} %i\n", InfosDlg, APlayerData[playerid][PlayerLevel]);
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}Score:{00ff00} %i\n", InfosDlg, APlayerData[playerid][PlayerScore]);
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}Dinheiro em maos:{00ff00} %i\n", InfosDlg, APlayerData[playerid][PlayerMoney]);
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}Dinheiro no banco:{00ff00} %i\n", APlayerData[targetid][BankMoney]);
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}Procurado:{00ff00} %i\n", InfosDlg, GetPlayerWantedLevel(playerid));
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}Logado a:{00ff00} %s\n", InfosDlg, Convert(APlayerData[playerid][TempoConectado]));
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}Texto cabeca:{00ff00} %s\n", InfosDlg, APlayerData[playerid][Cabeca]);
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}Frase ao Conectar:{00ff00} %s\n\n", InfosDlg, APlayerData[playerid][Frase]);
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}Seu IP:{00ff00} %s\n", InfosDlg, JUIP);
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}SA-MP:{00ff00} 0.3z\n", InfosDlg);
    ShowPlayerDialog(playerid, Infd, DIALOG_STYLE_MSGBOX, "Informacoes", InfosDlg, "Fechar", "");
    format(StrJU, 128, "{ffffff}%s {999999}estб visulizando informaзхes ъteis da sua conta em {ffffff}/infos", NomeJU);
    SendClientMessageToAll(-1, StrJU);
    return 1;
}


I'am Brazilian

English By: ****** Tradudor
Reply
#2

You forgot to add InfosDlg to the line with APlayerData[targetid][BankMoney].

This should work:

pawn Код:
CMD:infos(playerid, params[])
{
    new JUIP[50], NomeJU[30], StrJU[128], targetid, InfosDlg[9999];
    GetPlayerName(targetid, NomeJU, sizeof(NomeJU));
    GetPlayerIp(playerid, JUIP, sizeof(JUIP));
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}Nick:{00ff00} %s\n", InfosDlg, NomeJU);
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}Level:{00ff00} %i\n", InfosDlg, APlayerData[playerid][PlayerLevel]);
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}Score:{00ff00} %i\n", InfosDlg, APlayerData[playerid][PlayerScore]);
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}Dinheiro em maos:{00ff00} %i\n", InfosDlg, APlayerData[playerid][PlayerMoney]);
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}Dinheiro no banco:{00ff00} %i\n", InfosDlg, APlayerData[targetid][BankMoney]);
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}Procurado:{00ff00} %i\n", InfosDlg, GetPlayerWantedLevel(playerid));
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}Logado a:{00ff00} %s\n", InfosDlg, Convert(APlayerData[playerid][TempoConectado]));
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}Texto cabeca:{00ff00} %s\n", InfosDlg, APlayerData[playerid][Cabeca]);
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}Frase ao Conectar:{00ff00} %s\n\n", InfosDlg, APlayerData[playerid][Frase]);
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}Seu IP:{00ff00} %s\n", InfosDlg, JUIP);
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}SA-MP:{00ff00} 0.3z\n", InfosDlg);
    ShowPlayerDialog(playerid, Infd, DIALOG_STYLE_MSGBOX, "Informacoes", InfosDlg, "Fechar", "");
    format(StrJU, 128, "{ffffff}%s {999999}estб visulizando informaзхes ъteis da sua conta em {ffffff}/infos", NomeJU);
    SendClientMessageToAll(-1, StrJU);
    return 1;
}
Reply
#3

All is wrong. What r u want to do? playerid or targetid? If you want see information about yourself:
pawn Код:
CMD:infos(playerid)
{
    new JUIP[16], NomeJU[MAX_PLAYER_NAME], StrJU[128], version[40], InfosDlg[1024];
    GetPlayerName(playerid, NomeJU, sizeof(NomeJU));
    GetPlayerIp(playerid, JUIP, sizeof(JUIP));
    GetPlayerVersion(playerid, version, sizeof(version));
    format(InfosDlg, sizeof(InfosDlg), "{0000FF}Nick:{00ff00} %s\n", NomeJU);
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}Level:{00ff00} %i\n", InfosDlg, APlayerData[playerid][PlayerLevel]);
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}Score:{00ff00} %i\n", InfosDlg, APlayerData[playerid][PlayerScore]);
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}Dinheiro em maos:{00ff00} %i\n", InfosDlg, APlayerData[playerid][PlayerMoney]);
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}Dinheiro no banco:{00ff00} %i\n", APlayerData[playerid][BankMoney]);
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}Procurado:{00ff00} %i\n", InfosDlg, GetPlayerWantedLevel(playerid));
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}Logado a:{00ff00} %s\n", InfosDlg, Convert(APlayerData[playerid][TempoConectado]));
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}Texto cabeca:{00ff00} %s\n", InfosDlg, APlayerData[playerid][Cabeca]);
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}Frase ao Conectar:{00ff00} %s\n\n", InfosDlg, APlayerData[playerid][Frase]);
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}Seu IP:{00ff00} %s\n", InfosDlg, JUIP);
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}SA-MP:{00ff00} %s\n", InfosDlg, version);
    ShowPlayerDialog(playerid, Infd, DIALOG_STYLE_MSGBOX, "Informacoes", InfosDlg, "Fechar", "");
    format(StrJU, sizeof(StrJU), "%s {999999}estб visulizando informaзхes ъteis da sua conta em {ffffff}/infos", NomeJU);
    SendClientMessageToAll(0xFFFFFFFF, StrJU);
    return 1;
}
For check info about other players (u can add only that command):
pawn Код:
CMD:infos(playerid, params[])
{
    new JUIP[16], NomeJU[MAX_PLAYER_NAME], StrJU[128], version[40], InfosDlg[1024], targetid = strval(params[0]);
    GetPlayerName(targetid, NomeJU, sizeof(NomeJU));
    GetPlayerIp(targetid, JUIP, sizeof(JUIP));
    GetPlayerVersion(targetid, version, sizeof(version));
    format(InfosDlg, sizeof(InfosDlg), "{0000FF}Nick:{00ff00} %s\n", NomeJU);
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}Level:{00ff00} %i\n", InfosDlg, APlayerData[targetid][PlayerLevel]);
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}Score:{00ff00} %i\n", InfosDlg, APlayerData[targetid][PlayerScore]);
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}Dinheiro em maos:{00ff00} %i\n", InfosDlg, APlayerData[targetid][PlayerMoney]);
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}Dinheiro no banco:{00ff00} %i\n", APlayerData[targetid][BankMoney]);
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}Procurado:{00ff00} %i\n", InfosDlg, GetPlayerWantedLevel(targetid));
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}Logado a:{00ff00} %s\n", InfosDlg, Convert(APlayerData[targetid][TempoConectado]));
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}Texto cabeca:{00ff00} %s\n", InfosDlg, APlayerData[targetid][Cabeca]);
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}Frase ao Conectar:{00ff00} %s\n\n", InfosDlg, APlayerData[targetid][Frase]);
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}Seu IP:{00ff00} %s\n", InfosDlg, JUIP);
    format(InfosDlg, sizeof(InfosDlg), "%s {0000FF}SA-MP:{00ff00} %s\n", InfosDlg, version);
    ShowPlayerDialog(playerid, Infd, DIALOG_STYLE_MSGBOX, "Informacoes", InfosDlg, "Fechar", "");
    format(StrJU, sizeof(StrJU), "%s {999999}estб visulizando informaзхes ъteis da sua conta em {ffffff}/infos", NomeJU);
    SendClientMessageToAll(0xFFFFFFFF, StrJU);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)