Dialog doesn't show everything - 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 doesn't show everything (
/showthread.php?tid=638937)
Dialog doesn't show everything -
IndependentGaming - 08.08.2017
Hello, I have made a new system but the command dialog doesn't show everything all it showing is the first 2 lines
CMD:
PHP код:
CMD:bonusshop(playerid, params[]) {
if(!IsPlayerInRangeOfPoint(playerid, 5, 793.95, 1103.53, 5151.72))
return SendClientMessageEx(playerid, COLOR_GREY, "You aren't at the bonus shop.");
if(PlayerCuffed[playerid] >= 1 || GetPVarInt(playerid, "Injured") == 1)
return SendClientMessage(playerid, COLOR_WHITE, "You can't do this right now.");
if(GetPVarInt(playerid, "EventToken") != 0)
return SendClientMessage(playerid, COLOR_GREY, "You can't access the bonus shop while you're in an event.");
if(PlayerInfo[playerid][pJailTime] > 0)
return SendClientMessage(playerid, COLOR_WHITE, "You can't use this in jail/prison.");
if(IsPlayerInAnyVehicle(playerid))
return SendClientMessage(playerid, COLOR_GREY, "You can't do this while you're in a vehicle.");
new LineOne[465];
new LineTwo[410];
new LineThree[410];
new LineFour[410];
new string[875];
format(LineOne,sizeof(LineOne),"{FFFFFF}50 pot, 25 crack {00F70C}(Price: 20 token)\n{FFFFFF}5,000 materials {00F70C}(Price: 35 token)\n{FFFFFF}5 respect points {00F70C}(Price: 25 token)\n{FFFFFF}SPAS-12 & Deagle {00F70C}(Price: 50 token)\n{FFFFFF}150 pot, 75 crack {00F70C}(Price: 55 tokens)\n{FFFFFF}Full weapon set {00F70C}(Price: 100 tokens)\n{FFFFFF}11 respect points {00F70C}(Price: 47 tokens)");
format(LineTwo,sizeof(LineOne),"{FFFFFF}7,500 materials {00F70C}(Price: 135 tokens)\n{FFFFFF}1 week Sapphire VIP {00F70C}(Price: 450 tokens)");
format(LineThree,sizeof(LineTwo),"{FFFFFF}1 week diamond VIP {00F70C}(Price: 550 tokens)\n{FFFFFF}10,000 {00F70C}(Price: 150 tokens)\n{FFFFFF}15,000 materials {00F70C}(Price: 175 tokens)\n{FFFFFF}20 respect points {00F70C}(Price: 230 tokens)\n{FFFFFF}1 Emerald VIP {00F70C}(Price: 1500 tokens)");
format(LineFour,sizeof(LineThree),"{FFFFFF}Normal car of choice from one of the dealerships {00F70C}(Price: 2000 tokens)\n{FFFFFF}Normal/Sport car of choice from one of the dealerships {00F70C}(Price: 2500 tokens)");
format(string,sizeof(string),"%s\n%s",LineOne, LineTwo, LineThree, LineFour);
ShowPlayerDialog(playerid, DIALOG_RLBSHOP, DIALOG_STYLE_LIST, "Red Label Bonus Shop", string, "Purchase", "Cancel");
return 1;
}
All it showing is till 1 week Sapphire VIP
Re: Dialog doesn't show everything -
Ghazal - 08.08.2017
Use strcat instead.
Example:
pawn Код:
CMD:bonusshop(playerid, params[]) {
if(!IsPlayerInRangeOfPoint(playerid, 5, 793.95, 1103.53, 5151.72))
return SendClientMessageEx(playerid, COLOR_GREY, "You aren't at the bonus shop.");
if(PlayerCuffed[playerid] >= 1 || GetPVarInt(playerid, "Injured") == 1)
return SendClientMessage(playerid, COLOR_WHITE, "You can't do this right now.");
if(GetPVarInt(playerid, "EventToken") != 0)
return SendClientMessage(playerid, COLOR_GREY, "You can't access the bonus shop while you're in an event.");
if(PlayerInfo[playerid][pJailTime] > 0)
return SendClientMessage(playerid, COLOR_WHITE, "You can't use this in jail/prison.");
if(IsPlayerInAnyVehicle(playerid))
return SendClientMessage(playerid, COLOR_GREY, "You can't do this while you're in a vehicle.");
new Lines[1700];
strcat(Lines, "{FFFFFF}50 pot, 25 crack {00F70C}(Price: 20 token)\n{FFFFFF}5,000 materials {00F70C}(Price: 35 token)\n{FFFFFF}5 respect points {00F70C}(Price: 25 token)\n")
strcat(Lines, "{FFFFFF}SPAS-12 & Deagle {00F70C}(Price: 50 token)\n{FFFFFF}150 pot, 75 crack {00F70C}(Price: 55 tokens)\n{FFFFFF}Full weapon set {00F70C}(Price: 100 tokens)\n")
strcat(Lines, "{FFFFFF}11 respect points {00F70C}(Price: 47 tokens)\n{FFFFFF}7,500 materials {00F70C}(Price: 135 tokens)\n{FFFFFF}1 week Sapphire VIP {00F70C}(Price: 450 tokens)\n")
strcat(Lines, "{FFFFFF}1 week diamond VIP {00F70C}(Price: 550 tokens)\n{FFFFFF}10,000 {00F70C}(Price: 150 tokens)\n{FFFFFF}15,000 materials {00F70C}(Price: 175 tokens)\n")
strcat(Lines, "{FFFFFF}20 respect points {00F70C}(Price: 230 tokens)\n{FFFFFF}1 Emerald VIP {00F70C}(Price: 1500 tokens)\n{FFFFFF}Normal car of choice from one of the dealerships {00F70C}(Price: 2000 tokens)\n")
strcat(Lines, "{FFFFFF}Normal/Sport car of choice from one of the dealerships {00F70C}(Price: 2500 tokens)\n")
ShowPlayerDialog(playerid, DIALOG_RLBSHOP, DIALOG_STYLE_LIST, " Red Label Bonus Shop", Lines, "Purchase", "Cancel");
return 1;
}