Dialog Problem
#1

Hello. I got a question. How can I put a status in Dialog, Exemple. I want to make the old /stats in a Dialog like this one: I want to use the DIALOG_STYLE_MSGBOX for my Stats. Thanks for help!

Код:
ShowPlayerDialog(playerid, 8523, DIALOG_STYLE_MSGBOX, "Status", "Status............)", "Close", "Close");
Reply
#2

As example
pawn Код:
new
    tmp[256],
    Float: health,
    Float: armour
;
GetPlayerHealth(playerid, health);
GetPlayerArmour(playerid, armour);

format(tmp, sizeof tmp, "\
    Playerid: %d\n\
    Health: %f\n\
    Armour: %f\n\
    Money: %d\n\
    "
,
    playerid,
    health,
    armour,
    money
);
// Second button gets removed if you dont specify a text
ShowPlayerDialog(playerid, 8523, DIALOG_STYLE_MSGBOX, "Status", tmp, "Close", "");
Reply
#3

pawn Код:
new string[256];
format(string, sizeof(string), "Age: %d\nScore: %d", Variable_For_Age, Variable_For_Score);
ShowPlayerDialog(playerid, 8523, DIALOG_STYLE_MSGBOX, "Status", string, "Close", "Close");
And so on

Edit: Someone posted before me...
Reply
#4

Quote:
Originally Posted by lelemaster
Посмотреть сообщение
pawn Код:
new string[256];
format(string, sizeof(string), "Age: %d\nScore: %d", Variable_For_Age, Variable_For_Score);
ShowPlayerDialog(playerid, 8523, DIALOG_STYLE_MSGBOX, "Status", string, "Close", "Close");
And so on

Edit: Someone posted before me...
This seems to work, but how I can do like... I have like all of this. How can I put all of this in same Dialog ?

PS : I am not that bad But I never had anything with Dialog and is my first time using this.

Код:
	format(string, sizeof(string), "Level: %d | Respect: %d | Money: $%d | Vehicle 1: %s (ID: %d) | Vehicle 2: %s (ID: %d)", PlayerInfo[playerb][pLevel], PlayerInfo[playerb][pHours], PlayerInfo[playerb][pMoney], RVN(GetVehicleModel(PlayerInfo[playerb][pVeh])), PlayerInfo[playerb][pVeh], RVN(GetVehicleModel(PlayerInfo[playerb][pVVeh])), PlayerInfo[playerb][pVVeh]);
	SendClientMessage(playerid, COLOR_WHITE, string);
 	format(string, sizeof(string), "Faction: %s | Rank: %s (%d) | Division: %s | Family: %s | Rank: %s (%d)", RPFNEx(playerb), RPFRN(playerb), PlayerInfo[playerb][pFacRank], RPFDN(playerb), RPFaN(playerb), RPFaRN(playerb), PlayerInfo[playerb][pFamRank]);
	SendClientMessage(playerid, COLOR_FADE2, string);
	format(string, sizeof(string), "Business 1: %s (ID: %s) | Business 2: %s (ID: %s)", RBT(PlayerInfo[playerb][pBiz]), RPBK(playerb), RBT(PlayerInfo[playerb][pVBiz]), RPVIPBK(playerb));
	SendClientMessage(playerid, COLOR_WHITE, string);
	format(string, sizeof(string), "Gate 1: %d | Gate 2: %d | Gate 3: %d | House 1: %s | House 2: %s ", PlayerInfo[playerb][pGate][0], PlayerInfo[playerb][pGate][1], PlayerInfo[playerb][pGate][2], RPHK(playerb), RPVIPHK(playerb));
 	SendClientMessage(playerid, COLOR_FADE2, string);
	format(string, sizeof(string), "WTC: %d | Warnings: %d | VIP: %s | Job 1: %s | Job 2: %s", PlayerInfo[playerb][pWTC], PlayerInfo[playerb][pWarns], RPVIPN(playerb), RPJN(playerb), RPVJN(playerb));
	SendClientMessage(playerid, COLOR_WHITE, string);
Reply
#5

pawn Код:
new string1[514], string2[514];
format(string2, sizeof(string2), "Level: %d | Respect: %d | Money: $%d | Vehicle 1: %s (ID: %d) | Vehicle 2: %s (ID: %d)\nFaction: %s | Rank: %s (%d) | Division: %s | Family: %s | Rank: %s (%d)", PlayerInfo[playerb][pLevel], PlayerInfo[playerb][pHours], PlayerInfo[playerb][pMoney], RVN(GetVehicleModel(PlayerInfo[playerb][pVeh])), PlayerInfo[playerb][pVeh], RVN(GetVehicleModel(PlayerInfo[playerb][pVVeh])), PlayerInfo[playerb][pVVeh],RPFNEx(playerb), RPFRN(playerb), PlayerInfo[playerb][pFacRank], RPFDN(playerb), RPFaN(playerb), RPFaRN(playerb), PlayerInfo[playerb][pFamRank]);
format(string1, sizeof(string1), "\nBusiness 1: %s (ID: %s) | Business 2: %s (ID: %s)\nGate 1: %d | Gate 2: %d | Gate 3: %d | House 1: %s | House 2: %s\nWTC: %d | Warnings: %d | VIP: %s | Job 1: %s | Job 2: %s", RBT(PlayerInfo[playerb][pBiz]), RPBK(playerb), RBT(PlayerInfo[playerb][pVBiz]), RPVIPBK(playerb), PlayerInfo[playerb][pGate][0], PlayerInfo[playerb][pGate][1], PlayerInfo[playerb][pGate][2], RPHK(playerb), RPVIPHK(playerb),PlayerInfo[playerb][pWTC], PlayerInfo[playerb][pWarns], RPVIPN(playerb), RPJN(playerb), RPVJN(playerb));
strins(string1, string2, 0);
ShowPlayerDialog(playerid, 8523, DIALOG_STYLE_MSGBOX, "Status", string, "Close", "Close");
I wish the lines aren't too long. Use strcat if it doesn't work. There will be more lines but much shorter
Reply
#6

Thank you very much. I appreciate! I rep you!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)