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 == 0 )
                    {
                            
//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(playerid, COLOR_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(string, sizeof(string), "~r~-%dLei", payout);
                            
GameTextForPlayer(playerid, string, 5000, 1);
                            
GivePlayerCash(playerid,- payout);
                            
SBizzInfo[9][sbTill] += payout;
                            
ExtortionSBiz(9, payout);
                        }
                        else
                        {
                            
format(string, sizeof(string), "~r~-%dLei", 5000);
                            
GameTextForPlayer(playerid, string, 5000, 1);
                            
GivePlayerCash(playerid,-5000);
                            
SBizzInfo[9][sbTill] += 5000;
                            
ExtortionSBiz(9, 5000);
                        }
                        
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                        
PlayerInfo[playerid][pPnumber] = 700000000 + random(99999999);
                        
PlayerInfo[playerid][pPnumber] = randphone;
                        
format(string, sizeof(string), "   Ti-ai luat un Mobil nou numarul tau de telefon este %d", randphone);
                        
SendClientMessage(playerid, COLOR_GRAD4, string);
                        
SendClientMessage(playerid, COLOR_GRAD5, "You can check this anytime by Typing /stats");
                        
SendClientMessage(playerid, COLOR_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)