How do i change this into ShowPlayerdialog
#1

PHP код:
            {
                                
format(stringsizeof(string), "~w~This House is for sale~n~~r~%s ~n~~w~Cost: ~g~$%d~n~~w~ TLS : ~g~%d~n~~b~/buyhouse ~w~to buy this house",HouseInfo[h][hDiscription],HouseInfo[h][hValue],HouseInfo[h][hLevel]);
                            }
                            
GameTextForPlayer(istring50003);
                        } 
Into This?
PHP код:
ShowPlayerDialog(playerid2DIALOG_STYLE_MSGBOX 
And this

PHP код:
            SendClientMessage(playerid,COLOR_YELLOW2,"BMX (5000) (481) (TLS-0), Faggio (10000) (462) (TLS-5) , Freeway (15000) (463) (TLS-10)");
                    
SendClientMessage(playerid,COLOR_YELLOW2,"Sanchez (20000) (468) (TLS-10), NRG-500 (50000) (522) (TLS-350), Majestic (60000) (517) (TLS-50), Tahoma (65000) (566) (TLS-65)");
                    
SendClientMessage(playerid,COLOR_YELLOW2,"Picador (70000) (600) (TLS-75), Voodoo (60000) (412) (TLS-65), Sabre (40000) (475) (TLS-40), Buccaneer (45000) (518) (TLS-45)");
                    
SendClientMessage(playerid,COLOR_YELLOW2,"Bobcat (20000) (422) (TLS-85), Mesa (100000) (500) (TLS-85), Tornado (100000) (576) (TLS-85)");
                    
SendClientMessage(playerid,COLOR_YELLOW2,"Hermes (100000) (474) (TLS-85), Greenwood (110000) (492) (TLS-95), Blade (120000) (536) (TLS-150), Merit (120000) (551) (TLS-200)");
                    
SendClientMessage(playerid,COLOR_YELLOW2,"Feltzer (120000) (533) (TLS-200), Sentinel (130000) (405) (TLS-300), Stratum (130000) (561) (TLS-300)"); 
TO make it less short. I tried using ShowPlayerDialog. It covers the screen.
Anyone mind telling me. Im not good at On Dialog thing.

Thanks
Reply
#2

Bump. Anyone?
Reply
#3

Try this.

Код:
new s[256];
strcat(s, ""COLOR_YELLOW2,"BMX (5000) (481) (TLS-0), Faggio (10000) (462) (TLS-5) , Freeway (15000) (463) (TLS-10)\n"); 
strcat(s, ""COLOR_YELLOW2,"Sanchez (20000) (468) (TLS-10), NRG-500 (50000) (522) (TLS-350), Majestic (60000) (517) (TLS-50), Tahoma (65000) (566) (TLS-65)\n"); 
strcat(s, ""COLOR_YELLOW2,"Picador (70000) (600) (TLS-75), Voodoo (60000) (412) (TLS-65), Sabre (40000) (475) (TLS-40), Buccaneer (45000) (518) (TLS-45)\n"); 
strcat(s, ""COLOR_YELLOW2,"Bobcat (20000) (422) (TLS-85), Mesa (100000) (500) (TLS-85), Tornado (100000) (576) (TLS-85)\n"); 
strcat(s, ""COLOR_YELLOW2,"Hermes (100000) (474) (TLS-85), Greenwood (110000) (492) (TLS-95), Blade (120000) (536) (TLS-150), Merit (120000) (551) (TLS-200)\n"); 
strcat(s, ""COLOR_YELLOW2,"Feltzer (120000) (533) (TLS-200), Sentinel (130000) (405) (TLS-300), Stratum (130000) (561) (TLS-300)\n");  
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "(Dialog Name)", s, "Ok");
If all of the text doesn't show, increase the size of s.

Basic use of ShowPlayerDialog can be found here: https://sampwiki.blast.hk/wiki/ShowPlayerDialog
Reply
#4

I got error
C:\Users\nishki\Desktop\Basic RP \gamemodes\PS-RP.pwn(26520) : warning 215: expression has no effect
C:\Users\nishki\Desktop\Basic RP \gamemodes\PS-RP.pwn(26520) : warning 215: expression has no effect
C:\Users\nishki\Desktop\Basic RP \gamemodes\PS-RP.pwn(26520) : error 001: expected token: ";", but found ")"
C:\Users\nishki\Desktop\Basic RP \gamemodes\PS-RP.pwn(26520) : error 029: invalid expression, assumed zero
C:\Users\nishki\Desktop\Basic RP \gamemodes\PS-RP.pwn(26520) : fatal error 107: too many error messages on one line

PHP код:
    if(strcmp(cmd"/buyvehicle"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            
tmp strtok(cmdtextidx);
            if(!
IsAtDealership(playerid))
            {
                return 
1;
            }
            if(!
strlen(tmp))
            {
                if(
PlayerToPoint(3.0playerid,2130.7195,-1147.0983,24.3918))
                {
                new 
s[256];
                
strcat(s""COLOR_YELLOW2,"BMX (5000) (481) (TLS-0), Faggio (10000) (462) (TLS-5) , Freeway (15000) (463) (TLS-10)\n");
                
strcat(s""COLOR_YELLOW2,"Sanchez (20000) (468) (TLS-10), NRG-500 (50000) (522) (TLS-350), Majestic (60000) (517) (TLS-50), Tahoma (65000) (566) (TLS-65)\n");
                
strcat(s""COLOR_YELLOW2,"Picador (70000) (600) (TLS-75), Voodoo (60000) (412) (TLS-65), Sabre (40000) (475) (TLS-40), Buccaneer (45000) (518) (TLS-45)\n");
                
strcat(s""COLOR_YELLOW2,"Bobcat (20000) (422) (TLS-85), Mesa (100000) (500) (TLS-85), Tornado (100000) (576) (TLS-85)\n");
                
strcat(s""COLOR_YELLOW2,"Hermes (100000) (474) (TLS-85), Greenwood (110000) (492) (TLS-95), Blade (120000) (536) (TLS-150), Merit (120000) (551) (TLS-200)\n");
                
strcat(s""COLOR_YELLOW2,"Feltzer (120000) (533) (TLS-200), Sentinel (130000) (405) (TLS-300), Stratum (130000) (561) (TLS-300)\n");
                
ShowPlayerDialog(playerid0DIALOG_STYLE_MSGBOX"(Dialog Name)"s"Ok");
                } 
The Line error is
PHP код:
                strcat(s""COLOR_YELLOW2,"BMX (5000) (481) (TLS-0), Faggio (10000) (462) (TLS-5) , Freeway (15000) (463) (TLS-10)\n"); 
Reply
#5

Bump Anyone??
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)