Phone Number
#1

I want so the first letters to be 07 and then +8 letters... like 07[33333333] to be in total 10 letters!

new randphone = 1000 + random(8999);//minimum 1000 max 9999
PlayerInfo[playerid][pPnumber] = randphone;
Reply
#2

new randphone = 10000000 + random(89999999);//minimum 1000 max 99999999
PlayerInfo[playerid][pPnumber] = 07randphone;

Try this.
Reply
#3

did you test it?
Reply
#4

Код:
PlayerInfo[playerid][pPnumber] = 700000000 + random(99999999);
and use this to format the number like 07...
Код:
format(szString, sizeof szString, "My number is %010d", PlayerInfo[playerid][pPnumber]);
Reply
#5

No. but you can try atlast. if doest work then say so.
Reply
#6

PHP код:
                    if( listitem == )
                    {
                            
//if(PlayerInfo[playerid][pPnumber] != 0)
                            //{
                            //    SendClientMessage(playerid, COLOR_GREY, "   Deja ai un Mobil ! ");
                            //    return 1;
                        //    }
                            
if(PlayerInfo[playerid][pTraderPerk] > 0)
                            {
                            if(
GetPlayerCash(playerid) <= 5000) return SendClientMessage(playeridCOLOR_RED"Nu ai destui bani pentru a cumpara de la 24/7!");
                            new 
skill 5000 100;
                            new 
price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
                            new 
payout 5000 price;
                            
format(stringsizeof(string), "~r~-%dLei"payout);
                            
GameTextForPlayer(playeridstring50001);
                            
GivePlayerCash(playerid,- payout);
                            
SBizzInfo[9][sbTill] += payout;
                            
ExtortionSBiz(9payout);
                        }
                        else
                        {
                            
format(stringsizeof(string), "~r~-%dLei"5000);
                            
GameTextForPlayer(playeridstring50001);
                            
GivePlayerCash(playerid,-5000);
                            
SBizzInfo[9][sbTill] += 5000;
                            
ExtortionSBiz(95000);
                        }
                        
PlayerPlaySound(playerid10520.00.00.0);
                        
PlayerInfo[playerid][pPnumber] = 700000000 random(99999999);
                        
PlayerInfo[playerid][pPnumber] = randphone;
                        
format(stringsizeof(string), "   Ti-ai luat un Mobil nou numarul tau de telefon este %d"randphone);
                        
SendClientMessage(playeridCOLOR_GRAD4string);
                        
SendClientMessage(playeridCOLOR_GRAD5"You can check this anytime by Typing /stats");
                        
SendClientMessage(playeridCOLOR_WHITE"HINT: You can now type /help to see your cell phone commands.");
                        return 
1;
                    } 
Reply
#7

Quote:
Originally Posted by scout322
Посмотреть сообщение
new randphone = 10000000 + random(89999999);//minimum 1000 max 99999999
PlayerInfo[playerid][pPnumber] = 07randphone;

Try this.
Quote:
Originally Posted by scout322
Посмотреть сообщение
No. but you can try atlast. if doest work then say so.
Just don't post if you're clueless, okay? A trained eye immediately sees that this won't work at all.
Reply
#8

Fixed - Thanks to all!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)