Dialog - 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 (
/showthread.php?tid=375096)
Dialog -
0utLaW_ - 05.09.2012
hello, i have a piece of code here which i would like in dialog. (i mean all the messages) it appear when player spawns so whenever player choose role as theif and spawn all the messages appear to them in a dialog instead in chatbox.
pawn Код:
new rname[MAX_PLAYER_NAME];
GetPlayerName(playerid, rname, sizeof(rname));
if(GetPlayerMenu(playerid) == Roles)
{
switch(row)
{
case 0: // Thief
{
SetPlayerTeam(playerid, THIEF);
SendClientMessage(playerid, LIGHT_BLUE, "You made your choice. You are now a Thief.");
SendClientMessage(playerid, LIGHT_BLUE, "As a Thief, you need to rob things.");
SendClientMessage(playerid, LIGHT_BLUE, "To see your role's commands, type: /rcommands");
ChoosingRole[playerid] = 0;
TogglePlayerControllable(playerid, true);
GivePlayerWeapon(playerid, 4, 1);
GivePlayerWeapon(playerid, 24, 100);
GivePlayerWeapon(playerid, 29, 250);
}
Any help is kind and appricieated.
Re: Dialog -
0utLaW_ - 05.09.2012
Anyone ?...
Its urgent.
Re: Dialog -
RanSEE - 05.09.2012
it should be like
pawn Код:
ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX ,"Theif","You made your choice\nYou are now a Thief\nAs a Thief, you need to rob things\nTo see your role's commands, /rcommands","Ok","Cancel");
pawn Код:
new rname[MAX_PLAYER_NAME];
GetPlayerName(playerid, rname, sizeof(rname));
if(GetPlayerMenu(playerid) == Roles)
{
switch(row)
{
case 0: // Thief
{
SetPlayerTeam(playerid, THIEF);
ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX ,"Theif","You made your choice\nYou are now a Thief\nAs a Thief, you need to rob things\nTo see your role's commands, /rcommands","Ok","Cancel");
ChoosingRole[playerid] = 0;
TogglePlayerControllable(playerid, true);
GivePlayerWeapon(playerid, 4, 1);
GivePlayerWeapon(playerid, 24, 100);
GivePlayerWeapon(playerid, 29, 250);
}
Used DIALOG_STYLE_MSGBOX
P.S: Dont bump for atleast 48 hours.
Re: Dialog -
0utLaW_ - 05.09.2012
Thanks a lot, <3 it worked, repped.