Number ALWAYS needs to start with 666
#1

Hello,

Im sorry, my second problem for today which is pretty weird. I want a phone number to start with 666, like in the real San Francisco. So, I tried this:

The GetFreeNumber function does not matter now. The only problem is: this just the value GetFreeNumber returns his value (the phone number without 666, so for example: 768.

When I seperate the thingy by '666 %i' it gives: '666 0'. Weird?

So: how can I just let it return as: 6667688?
Regards, Jochem

Note: code was deleted, problem fixed.
Reply
#2

format(string,sizeof(string),"666%i",GetFreeNumber (playerid));
SendClientMessageToAll(COLOR_GREEN,string);

This gives only the GetFreeNumber return as far as i understood?
Reply
#3

Yea, you're right.
Reply
#4

pawn Код:
new string[50],
    SixSixSix = 666;
format(string,sizeof(string),"%d%d",SixSixSix,GetFreeNumber(playerid));
SendClientMessageToAll(COLOR_GREEN,string);
Try now.
Reply
#5

Just returns 6660.
Reply
#6

Quote:
Originally Posted by Jochemd
Посмотреть сообщение
Just returns 6660.
Then change %d%d to %d%i i guess %i it's the right format.
Reply
#7

It is the same, isn't it? And it returns just 6660 again :S
Reply
#8

if there is a 0, you're GetFreeNumber is not working.
Replace GetFreeNumber with a random number to prove it (But not zero )
Reply
#9

Try only GetFreeNumber... maybe it now returns 0 You could also try something complexer, making possible numbers with 6660003 for example.
Reply
#10

It can't return 0.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)