ShowPlayerDialog to someone
#1

Well since I'm working on an "activity" system I need some help, I have gangs and stuff defined as "PlayerInfo[playerid][pMember]" and... just look at the code it should do more talking than me


PHP код:
    else if(dialogid == D_MEMBERS_1)
    {
        if(!
response) return true;
        if(
response)
        {
            new 
atext[64];
            new 
bbzb[1024];
            new 
online;
            for(new 
2141b++)
            {
                if(!
strcmp(MMB[b][mmbName], "No-one"true))
                {
                    
format(atextsizeof(atext), "{FFFFFF}[%d] No-one\n"b);
                    
strcat(bbzbatext);
                }
                else
                {
                    
format(atextsizeof(atext), "{FFFFFF}[%d] %s | "bMMB[b][mmbName]);
                    
strcat(bbzbatext);
                    
online 0;
                    foreach(new 
Player)
                    {
                           if(
IsPlayerConnected(i) && PlayerInfo[i][pMember] == b)
                        {
                            
online 1;
                              
format(atextsizeof(atext), "Online");
                            
strcat(bbzbatext);
                        }
                    }
                    if(
online == 0)
                    {
                        
format(atextsizeof(atext), "Offline (%dhours)\n"MMB[b][mmbOff]);
                        
strcat(bbzbatext);
                    }
                }
            }
            
SPD(playeridD_MEMBERS_2DSM"Members"bbzb"Close""Back");
        }
    } 
So I want to load the players "pMember" and him his organisation members, my folder for that "scriptfiles/organisation/%d/member_%d [ first %s going from 1 to 17, the other one from 0 to 40 ( the member slo t ) ]" like I want, I mean i want to load the "playerid" organisation and show him his members

EDIT: The command for that
PHP код:
cmd:members(playerid,params[])
{
    new 
atext[64];
    new 
zbzbz[1024];
    new 
online;
    for(new 
121b++)
    {
        if(!
strcmp(MMB[b][mmbName], "No-one"true))
        {
            
format(atextsizeof(atext), "{FFFFFF}[%d] No-one\n"b);
            
strcat(zbzbzatext);
        }
        else
        {
            
format(atextsizeof(atext), "{FFFFFF}[%d] %s | "bMMB[b][mmbName]);
            
strcat(zbzbzatext);
            
online 0;
            for(new 
i=0i<MAX_PLAYERSi++)
            {
                   if(
IsPlayerConnected(i) && PlayerInfo[i][pMember] == b)
                {
                    
online 1;
                      
format(atextsizeof(atext), "Online");
                    
strcat(zbzbzatext);
                }
            }
            if(
online == 0)
            {
                
format(atextsizeof(atext), "Offline (%dhours)\n"MMB[b][mmbNeakt]);
                
strcat(zbzbzatext);
            }
        }
    }
    
SPD(playeridD_MEMBERS_1DSM""Members", zbzbz, "Next", "Close");
    return true;

Reply
#2

bamp?
Reply
#3

Quote:
Originally Posted by IdonTmiss
Посмотреть сообщение
So I want to load the players "pMember" and him his organisation members, my folder for that "scriptfiles/organisation/%d/member_%d [ first %s going from 1 to 17, the other one from 0 to 40 ( the member slo t ) ]" like I want, I mean i want to load the "playerid" organisation and show him his members
so? what's stopping you?
Reply
#4

Quote:
Originally Posted by GhostHacker9
Посмотреть сообщение
so? what's stopping you?
How to do it lol?
Reply
#5

Quote:
Originally Posted by IdonTmiss
Посмотреть сообщение
How to do it lol?
what all you have tried?
Reply
#6

Don't complicate things and use MySQL.
Reply
#7

Quote:
Originally Posted by m1kas
Посмотреть сообщение
Don't complicate things and use MySQL.
If I knew how I would, lol
Reply
#8

Quote:
Originally Posted by m1kas
Посмотреть сообщение
Don't complicate things and use MySQL.
That's actually rather backward.

Just because it's easier, doesn't make it better. It's like saying you are able to work on a car, when all you can do is drive it, then when someone asks you to check the oil, you won't have a clue what to do.
Reply
#9

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
That's actually rather backward.

Just because it's easier, doesn't make it better. It's like saying you are able to work on a car, when all you can do is drive it, then when someone asks you to check the oil, you won't have a clue what to do.
If you prefer using an old, slow and outdated method of creating factions go for it, if you want an easy, simple to use method with way more possibilities - learning MySQL is suggested. I don't know why people are learning to use databases using .dini, when there are far more better options, and you probably won't ever use .dini when you move on to different scripting branches, such as website designing and coding.
Reply
#10

Quote:
Originally Posted by m1kas
Посмотреть сообщение
If you prefer using an old, slow and outdated method of creating factions go for it, if you want an easy, simple to use method with way more possibilities - learning MySQL is suggested. I don't know why people are learning to use databases using .dini, when there are far more better options, and you probably won't ever use .dini when you move on to different scripting branches, such as website designing and coding.
Oh shit, I actually took you half seriously, up until the point that you came upon relating scripting to putting a website together... Holy christ...

Now, this, is hilarious.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)