SA-MP Forums Archive
ShowPlayerDiALOG - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: ShowPlayerDiALOG (/showthread.php?tid=471449)



ShowPlayerDiALOG - Another1 - 23.10.2013

hello i make this code and everything is work fine but on showplayerdialog i want see Player name first then string but didnt work

pawn Код:
CMD:pinfo(playerid,params[])
{
  new id;
  if(!IsPlayerAdmin(playerid)) return SCM(playerid, RED, "UnKnown Command! Type /help");
  if(sscanf(params,"u", id)) return SCM(playerid, RED, "Get some info about a player: /pinfo <playerid>");
  if(!IsPlayerConnected(playerid)) return SCM(playerid, RED, "Player is not connected");
  new b_name[MAX_PLAYER_NAME], p_ip[25], str1[100], str2[30];
  GetPlayerName(playerid, b_name,sizeof (b_name));
  GetPlayerIp(playerid, p_ip,sizeof (p_ip));
  format(str1,sizeof (str1),"%s",b_name);
  format(str2,sizeof (str2),"%s",p_ip);
  ShowPlayerDialog(playerid, 12, DIALOG_STYLE_MSGBOX, "Info","Player Name b_name","Ok","");
  return 1;
}



Re: ShowPlayerDiALOG - -Prodigy- - 23.10.2013

pawn Код:
CMD:pinfo(playerid,params[])
{
    new id;
    if(!IsPlayerAdmin(playerid)) return SCM(playerid, RED, "UnKnown Command! Type /help");
    if(sscanf(params,"u", id)) return SCM(playerid, RED, "Get some info about a player: /pinfo <playerid>");
    if(!IsPlayerConnected(id)) return SCM(playerid, RED, "Player is not connected");

    new b_name[MAX_PLAYER_NAME], p_ip[25], str1[100];

    GetPlayerName(id, b_name,sizeof (b_name));
    GetPlayerIp(id, p_ip,sizeof (p_ip));

    format(str1, sizeof(str1), "Name: %s - IP: %s", b_name, b_ip);

    ShowPlayerDialog(playerid, 12, DIALOG_STYLE_MSGBOX, "Info",str1,"Ok","");
    return 1;
}



Re: ShowPlayerDiALOG - Another1 - 23.10.2013

Quote:
Originally Posted by -Prodigy-
Посмотреть сообщение
pawn Код:
CMD:pinfo(playerid,params[])
{
    new id;
    if(!IsPlayerAdmin(playerid)) return SCM(playerid, RED, "UnKnown Command! Type /help");
    if(sscanf(params,"u", id)) return SCM(playerid, RED, "Get some info about a player: /pinfo <playerid>");
    if(!IsPlayerConnected(id)) return SCM(playerid, RED, "Player is not connected");

    new b_name[MAX_PLAYER_NAME], p_ip[25], str1[100];

    GetPlayerName(id, b_name,sizeof (b_name));
    GetPlayerIp(id, p_ip,sizeof (p_ip));

    format(str1, sizeof(str1), "Name: %s - IP: %s", b_name, b_ip);

    ShowPlayerDialog(playerid, 12, DIALOG_STYLE_MSGBOX, "Info",str1,"Ok","");
    return 1;
}
thank you very much +1rep =)