Dm Server
#1

I made a new phonenumber thingy.. and I wanted the first 3 numbers to be 003 and then the player to decide 7 numbers .. and then if phone number is taken to appear "phone number taken" .. so we writes 7 numbers.. and first 3 official numbers for all..


PHP код:
if(dialogid == DIALOG_PNUM)
                    {
                        if(
response)
                        {
                            new 
lengh strval(inputtext);
                            if(
lengh && lengh 8)
                            {
                                
format(string,256,"Ok, Your Number is [%d].",lengh);
                                
SendClientMessage(playerid,COLOR_ORANGE,string);
                                
PlayerInfo[playerid][pPnumber] = lengh;
                                
ShowPlayerDialog(playerid,DIALOG_PNUM,DIALOG_STYLE_INPUT,"PhoneNumber","Write your phonenumber!","Ok","");
                            }
                            else return 
ShowPlayerDialog(playerid,DIALOG_PNUM,DIALOG_STYLE_INPUT,"PhoneNumber","Write your phonenumber!","Ok","");
                        }
                    } 
Reply
#2

Have your variable (integer) to store only the 7 digits and you can add "003" in the format.

PHP код:
new num strval(inputtext);
if(
num && strlen(inputtext) == 7)
{
    
format(string40"Ok, Your Number is [003%07d]."num);
    
SendClientMessage(playerid,COLOR_ORANGE,string);
    
PlayerInfo[playerid][pPnumber] = num;

and also have "%07d" so if the player enters 0 as a first digit, it will add the 0 to the message but not in the variable.
Reply
#3

at playerstats I see only 1000000 and I don't see 003..
Reply
#4

bump
Reply
#5

but what can I do people will type same number.. I need to make so people cant put same number.. but I don't know how.. anyone please?
Reply
#6

Did you format it in the stats like the [003%07d] as well?
Reply
#7

yes that was solved.. but people can have same phone number.. and really buggy..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)