SA-MP Forums Archive
dialog looks wrong.. - 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: dialog looks wrong.. (/showthread.php?tid=656309)



dialog looks wrong.. - TuNiSiAnO1 - 12.07.2018

hello i have made this command to show the player stats i have only one problem i want the green text all to be like Sniper Headshots and weapon headshots if u got me!, thanks




PHP код:
CMD:stats(playerid,params[])
{
  new 
idstr[250], name[24],tname[24];
  if(
sscanf(params,"d",id))
  {
    
GetPlayerName(playerid,name,sizeof(name));
    
format(str,sizeof(str),"{FFFFFF}Money:\t{0FFF00}($%d)\n{FFFFFF}Kills:\t{0FFF00}(%d)\n{FFFFFF}Deaths:\t{0FFF00}(%d)\n{FFFFFF}Sniper headshots:\t{0FFF00}(%d)\n{FFFFFF}Weapons headshots:\t{0FFF00}(%d)",
    
User[playerid][Money],User[playerid][Kills],User[playerid][Deaths],User[playerid][SniperHeadshots],User[playerid][WeaponsHeadshots]);
    
ShowPlayerDialog(playerid,dStats,DIALOG_STYLE_MSGBOX,name,str,"Close","");
  }
  else
  {
    if(!
IsPlayerConnected(playerid)) return SendClientMessage(playerid,Red,"Player is not connected");
    
GetPlayerName(playerid,tname,sizeof(tname));
    
format(str,sizeof(str),"{FFFFFF}Money:\t\t{0FFF00}($%d)\n{FFFFFF}Kills:\t\t{0FFF00}(%d)\n{FFFFFF}Deaths:\t\t{0FFF00}(%d)\n{FFFFFF}Sniper headshots:\t\t{0FFF00}(%d)\n{FFFFFF}Weapons headshots:\t\t{0FFF00}(%d)",
    
User[id][Money],User[id][Kills],User[id][Deaths],User[id][SniperHeadshots],User[id][WeaponsHeadshots]);
    
ShowPlayerDialog(playerid,dStats,DIALOG_STYLE_MSGBOX,tname,str,"Close","");
  }
  return 
1;




Re: dialog looks wrong.. - Akeem - 13.07.2018

Try putting 2 /t from the first 3 items and 1 /t for the other 2 items.


Re: dialog looks wrong.. - Sew_Sumi - 13.07.2018

If you made this, then how do you not know how to do this?

Copy-pasting only gets you so far.


Re: dialog looks wrong.. - TuNiSiAnO1 - 13.07.2018

i made this but i dont know how the \t thing works exactly i never copy anything i learn about it first then i type my own code in my way


Re: dialog looks wrong.. - TuNiSiAnO1 - 13.07.2018

Quote:
Originally Posted by Akeem
Посмотреть сообщение
Try putting 2 /t from the first 3 items and 1 /t for the other 2 items.
Thank you that helps i have put 3 of /t and it looks fine now