Help created showdialog
#1

Код:
CMD:stats(playerid, params[]) {
	if (gPlayerLogged{playerid} != 0) {
		ShowStats(playerid,playerid);
	}
	return 1;
}
I want to create a DIALOG_STYLE_MSGBOX in stats, but I do not know how to make it, help please
Reply
#2

http://forum.sa-mp.com/showpost.php?...80&postcount=2

Just follow the example.
Reply
#3

I dont understand ,, please help
Reply
#4

pawn Код:
ShowStats(playerid,playerid);
I beleive this is your Dialog ?
Reply
#5

Quote:
Originally Posted by Shinta307
Посмотреть сообщение
Код:
CMD:stats(playerid, params[]) {
	if (gPlayerLogged{playerid} != 0) {
		ShowStats(playerid,playerid);
	}
	return 1;
}
I want to create a DIALOG_STYLE_MSGBOX in stats, but I do not know how to make it, help please
PHP код:
enum pInfo {
pAdminLevel
pVIP
pCash
pScore
pVw
pInt
};  // Add this to the top of your script but below the includes. 
PHP код:
new PlayerInfo[MAX_PLAYERS][pInfo]; 
PHP код:
    COMMAND:stats(playerid,params[])
    {
      if(!
IsPlayerConnected(playerid))  
     {
      
ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Error: You need to be /login to use this command!","Ok","");
     }
     new 
admin PlayerInfo[playerid][pAdminLevel];
     new 
vip PlayerInfo[playerid][pVIP];
     new 
money PlayerInfo[playerid][pCash];
     new 
level PlayerInfo[playerid][pScore];
     new 
vw PlayerInfo[playerid][pVw];
     new 
interior PlayerInfo[playerid][pInt];
     new 
string[128],stats[1024];
     
format(stringsizeof string"{44A1D0}Level: {FFFFFF}[%d] {44A1D0}Money: {FFFFFF}[$%d] {44A1D0}AdminLevel: {FFFFFF}[$%d] {44A1D0}VIP: {FFFFFF}[$%d] {44A1D0}VW: {FFFFFF}[$%d] {44A1D0}Int: {FFFFFF}[$%d]"level,money,admin,vip,vw,interior);
     
       
format(statssizeof (stats), "%s"string);
            
ShowPlayerDialog(playerid,2,DIALOG_STYLE_MSGBOX,"Your account:",stats,"Ok","");
        }
        return 
1;
    } 
Use this code and I converted it from OnPlayerCommandText command to ZCMD command.

Credits:
MonkZemun - for his stats script.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)