sendclientmessage to msgbox ? +REP
#1

i dont know how to make this appears in Dialo MSGbox
PHP код:
        SendClientMessage(playeridCOLOR_YELLOW"_______________________________________________________________________________________");
        
format(coordsstringsizeof(coordsstring), "{33CCFF}[Account]{FFFFFF}: Name:[%s] Sex:[%s] Level:[%d] Respect:[%d/%d] Phone:[%d]",PlayerRPName(targetid),atext,level,exp,expamount,pnumber);
        
SendClientMessage(playeridCOLOR_WHITE,coordsstring);
        
format(coordsstringsizeof(coordsstring), "{33CCFF}[Details]{FFFFFF}: Money:[$%d] Bank:[$%d] Next Level Cost:[%d] Job:[%s] Job Level:[%s]",cash,account,costlevel,jtext,jlevel);
        
SendClientMessage(playeridCOLOR_WHITE,coordsstring);
        
format(coordsstringsizeof(coordsstring), "{33CCFF}[Details]{FFFFFF}: Married To:[%s] Affiliation:[%s] Rank:[%d]",married,GetPlayerFactionName(targetid),PlayerInfo[targetid][pRank]);
        
SendClientMessage(playeridCOLOR_WHITE,coordsstring);
        
format(coordsstringsizeof(coordsstring), "{33CCFF}[Upgrades]{FFFFFF}: Upgrade Points:[%d] Armor Upgrade:[%d] Health Upgrade:[%d] VIP:[%s]",points,shealth,shp,vip);
        
SendClientMessage(playeridCOLOR_WHITE,coordsstring);
        
format(coordsstringsizeof(coordsstring), "{33CCFF}[Property]{FFFFFF}: House:[%s] | Vehicle 1:[%s] | Vehicle 2:[%s] | Business:[%s]",htext,cartext1,cartext2,btext);
           
SendClientMessage(playeridCOLOR_WHITE,coordsstring);
           
format(coordsstringsizeof(coordsstring), "{33CCFF}[Inventory]{FFFFFF}: Materials:[%d] Pot:[%d] Crack:[%d] Package:[%d] Crates:[%d] Seeds:[%d] Products:[%d] WTc:[%d]",mats,pot,crack,packages,crates,potseeds,productswtc);
           
SendClientMessage(playeridCOLOR_WHITE,coordsstring);
           
format(coordsstringsizeof(coordsstring), "{33CCFF}[Inventory]{FFFFFF}: Ropes:[%d] Blindfolds:[%d] Cigars:[%d] Sprunk:[%d] Spraycan:[%d] Screw Driver:[%d] Deck of Cards:[%d]",rope,blindfolds,cigars,sprunk,spray,screw,deck);
           
SendClientMessage(playeridCOLOR_WHITE,coordsstring);
           
format(coordsstringsizeof(coordsstring), "{33CCFF}[Inventory]{FFFFFF}: Rod:[%s] Bait:[%s] Bait Left:[%d] Fishing Line[%s]"rodbaitbaitaline);
           
SendClientMessage(playeridCOLOR_WHITE,coordsstring);
           
format(coordsstringsizeof(coordsstring), "{33CCFF}[Records]{FFFFFF}: Playing Hours:[%d] Kills:[%d] Deaths:[%d] Biggest Fish:[%d] Crimes Commited:[%d] Times Arrested:[%d]",ptime,kills,deaths,bigfish,crimes,arrested);
           
SendClientMessage(playeridCOLOR_WHITE,coordsstring);
        if(
PlayerInfo[playerid][pAdmin] >= 2)
        {
            
format(coordsstringsizeof(coordsstring), "{F00000}[Admin Info]{FFFFFF} Vehicle 1 ID: %d | Vehicle 1 TID: %d | Vehicle 2 ID: %d | Vehicle 2 TID: %d"PlayerInfo[targetid][pCar][0], CarInfo[PlayerInfo[targetid][pCar][0]][c_ID], PlayerInfo[targetid][pCar][1], CarInfo[PlayerInfo[targetid][pCar][1]][c_ID]);
            
SendClientMessage(playeridCOLOR_GRAD5,coordsstring);
            
format(coordsstringsizeof(coordsstring), "{F00000}[Admin Info]{FFFFFF} Int: %d | VW: %d | Warnings: %d | JailTime: %d | Tikis: %d | Skin: %d",intir,vw,warns,jtime,tikis,skin);
            
SendClientMessage(playeridCOLOR_GRAD5,coordsstring);
        }
        
SendClientMessage(playeridCOLOR_YELLOW"____________________________________________");
    }
    return 
1;

Reply
#2

bump
Reply
#3

BUMP again !!
Reply
#4

stop fucking bumping, fucking wAit for a response dickhead




Look up strcat in wiki
Reply
#5

You literally waited FOUR minutes before bumping again.

Be patient and you might get some help.

Here's an example of a way you could do it:

PHP код:
new
    
primary_str[900],
    
sub_str[128]

format(sub_strsizeof(sub_str), "Your player ID is: %i\n"playerid); 
strcat(primary_strsub_str); 
ShowPlayerDialog(playeridDIALOG_IDDIALOG_STYLE"Caption"primary_str"<<"""); 
//primary_str: destination.
//sub_str: source. 
You don't need to format it if it's just plain text. For example:

PHP код:
strcat(primary_str"On the next line is your other information:\n"); 
Reply
#6

Quote:
Originally Posted by Meller
Посмотреть сообщение
stop fucking bumping, fucking wAit for a response dickhead




Look up strcat in wiki
sorry bro i dont know
Reply
#7

Quote:
Originally Posted by Arthur Kane
Посмотреть сообщение
You literally waited FOUR minutes before bumping again.

Be patient and you might get some help.

Here's an example of a way you could do it:

PHP код:
new
    
primary_str[900],
    
sub_str[128]

format(sub_strsizeof(sub_str), "Your player ID is: %i\n"playerid); 
strcat(primary_strsub_str); 
ShowPlayerDialog(playeridDIALOG_IDDIALOG_STYLE"Caption"primary_str"<<"""); 
//primary_str: destination.
//sub_str: source. 
You don't need to format it if it's just plain text. For example:

PHP код:
strcat(primary_str"On the next line is your other information:\n"); 
it didnt work it shows nothing when i tested it !
Reply
#8

Show me what you did. Post the code.
Reply
#9

PHP код:
        GetPlayerRPName(targetidnamesizeof(name));
        
format(sub_strsizeof(sub_str), "{33CCFF}[Account]{FFFFFF}: Name:[%s] Sex:[%s] Level:[%d] Respect:[%d/%d] Phone:[%d]",PlayerRPName(targetid),atext,level,exp,expamount,pnumber);
        
strcat(primary_strsub_str);
        
format(sub_strsizeof(sub_str), "{33CCFF}[Details]{FFFFFF}: Money:[$%d] Bank:[$%d] Next Level Cost:[%d] Job:[%s] Job Level:[%s]",cash,account,costlevel,jtext,jlevel);
        
strcat(primary_strsub_str);
        
format(sub_strsizeof(sub_str), "{33CCFF}[Details]{FFFFFF}: Married To:[%s] Affiliation:[%s] Rank:[%d]",married,GetPlayerFactionName(targetid),PlayerInfo[targetid][pRank]);
        
strcat(primary_strsub_str);
        
format(sub_strsizeof(sub_str), "{33CCFF}[Upgrades]{FFFFFF}: Upgrade Points:[%d] Armor Upgrade:[%d] Health Upgrade:[%d] VIP:[%s]",points,shealth,shp,vip);
        
strcat(primary_strsub_str);
        
format(sub_strsizeof(sub_str), "{33CCFF}[Property]{FFFFFF}: House:[%s] | Vehicle 1:[%s] | Vehicle 2:[%s] | Business:[%s]",htext,cartext1,cartext2,btext);
           
strcat(primary_strsub_str);
           
format(sub_strsizeof(sub_str), "{33CCFF}[Inventory]{FFFFFF}: Materials:[%d] Pot:[%d] Crack:[%d] Package:[%d] Crates:[%d] Seeds:[%d] Products:[%d] WTc:[%d]",mats,pot,crack,packages,crates,potseeds,productswtc);
           
strcat(primary_strsub_str);
           
format(sub_strsizeof(sub_str), "{33CCFF}[Inventory]{FFFFFF}: Ropes:[%d] Blindfolds:[%d] Cigars:[%d] Sprunk:[%d] Spraycan:[%d] Screw Driver:[%d] Deck of Cards:[%d]",rope,blindfolds,cigars,sprunk,spray,screw,deck);
           
strcat(primary_strsub_str);
           
format(sub_strsizeof(sub_str), "{33CCFF}[Inventory]{FFFFFF}: Rod:[%s] Bait:[%s] Bait Left:[%d] Fishing Line[%s]"rodbaitbaitaline);
           
strcat(primary_strsub_str);
           
format(sub_strsizeof(sub_str), "{33CCFF}[Records]{FFFFFF}: Playing Hours:[%d] Kills:[%d] Deaths:[%d] Biggest Fish:[%d] Crimes Commited:[%d] Times Arrested:[%d]",ptime,kills,deaths,bigfish,crimes,arrested);
           
strcat(primary_strsub_str);
        if(
PlayerInfo[playerid][pAdmin] >= 2)
        {
            
format(sub_strsizeof(sub_str), "{F00000}[Admin Info]{FFFFFF} Vehicle 1 ID: %d | Vehicle 1 TID: %d | Vehicle 2 ID: %d | Vehicle 2 TID: %d"PlayerInfo[targetid][pCar][0], CarInfo[PlayerInfo[targetid][pCar][0]][c_ID], PlayerInfo[targetid][pCar][1], CarInfo[PlayerInfo[targetid][pCar][1]][c_ID]);
            
strcat(primary_strsub_str);
            
format(sub_strsizeof(sub_str), "{F00000}[Admin Info]{FFFFFF} Int: %d | VW: %d | Warnings: %d | JailTime: %d | Tikis: %d | Skin: %d",intir,vw,warns,jtime,tikis,skin);
            
strcat(primary_strsub_str);
        }
    }
    return 
1;

Reply
#10

\n. New lines. You need to include it at the end of every string.

And you're not showing any dialog...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)