SA-MP Forums Archive
*Dialog* Please help - 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* Please help (/showthread.php?tid=325811)



*Dialog* Please help - |BGG|siraminor - 14.03.2012

Hello,
i'm looking for a pawn code which can show text in dialog only for one team.

Here an example:

PHP код:
                if (PlayerInfo[playerid][pMember] == TEAM_POLICE)
            {
                
SendClientMessage(playeridCOLOR_BLUE,"Police: /pduty /arrest /suspectf /mdc");
            } 
But i want to put it in this dialog:

PHP код:
if(strcmp(cmd"/help2"true) == 0)
    {
        
format(string,sizeof(string),"\t"lyellow2"{00FF00}Добре дошъл %s на помощната страница на{FFFFFF} {FF0000}FiberPlay GangWars!{FFFFFF}\n"PlayerName(playerid));
        
strcat(string,""lyellow2"[GENERAL]: /stats (/t)eam /pm /turfhelp /count\n");
        
strcat(string,""lblue"[GENERAL]: /rules /report /changepass /id /animlist /time\n");
        
strcat(string,""lorange"[GENERAL]: /hitman /teamstats /pay /lotto /bounties /admins\n");
        
strcat(string,""lgreen"[VIP]: /vip /vipusers /viphelp\n");
        
strcat(string,"\t"lred"Gangs: /acceptfaction(/af) /cancelfaction(/cf) /leaders\n\n\t\t"lred"FiberPlay.net");
        
ShowPlayerDialog(playerid,5555,0,""lred"GENERAL HELP",string,"OK","");
        return 
1;
    } 
Тhank you in advance.


Re: *Dialog* Please help - tyler12 - 14.03.2012

pawn Код:
if (PlayerInfo[playerid][pMember] == TEAM_POLICE)
            {
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Police commands", "/pduty\n/arrest\n/suspectf\n/mdc", "Close", "");
            }



Re: *Dialog* Please help - |BGG|siraminor - 14.03.2012

Man i want to add the commands for the team in this dialog:
PHP код:
if(strcmp(cmd"/help2"true) == 0)
    {
        
format(string,sizeof(string),"\t"lyellow2"{00FF00}Добре дошъл %s на помощната страница на{FFFFFF} {FF0000}FiberPlay GangWars!{FFFFFF}\n"PlayerName(playerid));
        
strcat(string,""lyellow2"[GENERAL]: /stats (/t)eam /pm /turfhelp /count\n");
        
strcat(string,""lblue"[GENERAL]: /rules /report /changepass /id /animlist /time\n");
        
strcat(string,""lorange"[GENERAL]: /hitman /teamstats /pay /lotto /bounties /admins\n");
        
strcat(string,""lgreen"[VIP]: /vip /vipusers /viphelp\n");
        
strcat(string,"\t"lred"Gangs: /acceptfaction(/af) /cancelfaction(/cf) /leaders\n\n\t\t"lred"Bye");
        
ShowPlayerDialog(playerid,5555,0,""lred"GENERAL HELP",string,"OK","");
        return 
1;
    } 



Re: *Dialog* Please help - Alexy_Dramon - 14.03.2012

Put It IN public OnPlayerCommandText(playerid, cmdtext[])
Код:
    return 1;
}
if (strcmp("/LSPD", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "LSPD", "pduty\nArrest \nSuspectf \nMdc", "Select", "Cancel");
Put it in public
Код:
OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
And make your Commands