HELP Please Dialog
#1

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.
Reply
#2

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.
Reply
#3

But I want to put it in the dialog
Reply
#4

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 ^_^
Reply
#5

check it now!
Reply
#6

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;
}
Reply
#7

lol late
Reply
#8

Works
Thanks !
REP +
Reply
#9

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


Forum Jump:


Users browsing this thread: 3 Guest(s)