SA-MP Forums Archive
HELP Please 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: HELP Please Dialog (/showthread.php?tid=325943)



HELP Please Dialog - |BGG|siraminor - 15.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"/help"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: HELP Please Dialog - Faisal_khan - 15.03.2012

pawn Код:
if(strcmp(cmd, "/help", true) == 0)
    if(gTeam[playerid] == TEAM_POLICE)//your gTeam
    {
        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,""lgreen"Police: /pduty /arrest /suspectf /md");
        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;
    }
It may help u.


Re: HELP Please Dialog - |BGG|siraminor - 15.03.2012

But I want to put it in the dialog


Re: HELP Please Dialog - emokidx - 15.03.2012

pawn Код:
if(strcmp(cmd, "/help", true) == 0)
{
    if(gTeam[playerid] == TEAM_POLICE)//your gTeam
    {
        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");
        strcat(string, "\nPolice: /pduty /arrest /suspectf /mdc");
        ShowPlayerDialog(playerid,5555,0,""lred"GENERAL HELP",string,"OK","");
       
    }  
    else
    {
        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;
}
maybe this, not tested and m sleepy so bie ^_^


Re: HELP Please Dialog - Faisal_khan - 15.03.2012

check it now!


Re: HELP Please Dialog - Faisal_khan - 15.03.2012

check it now!
pawn Код:
if(strcmp(cmd, "/help", true) == 0)
{
    if(gTeam[playerid] == TEAM_POLICE)//your gTeam and if police
    {
        format(string,sizeof(string),"\t"lyellow2"{00FF00}Добре дошъл %s на помощната страница на{FFFFFF} {FF0000}FiberPlay GangWars!{FFFFFF}\n", PlayerName(playerid));
        strcat(string, "\nPolice: /pduty /arrest /suspectf /mdc");
        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","");
       
    }  
    else//if not police
    {
        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;
}



Re: HELP Please Dialog - Faisal_khan - 15.03.2012

lol late


Re: HELP Please Dialog - |BGG|siraminor - 15.03.2012

Works
Thanks !
REP +


Re: HELP Please Dialog - Faisal_khan - 15.03.2012

Quote:
Originally Posted by |BGG|siraminor
Посмотреть сообщение
Works
Thaks !
REP +
to who?