How can I make a specific thing save random numbers?
#1

Title, basically. For example, how can I save a specific define, (Score, or whatever), save random numbers?
Reply
#2

Use any file saving include like yini is the best... u can use dini too ... and use a variable for the number so that while its chaning it can be saved immediately
Reply
#3

For saving you can use the default SA:MP file functions or Y_INI or something.
for getting random numbers or stuff use the Random function
Reply
#4

You can use this vairable, if needed?

Uses STRMID, and STRLEN.

pawn Код:
strmid(PlayerInfo[playerid][myvairable], "Code", 0, strlen("Code"), 999);
Reply
#5

No, no, I mean like, I just need to know how I can get it to save random numbers, as it's for a phone script. Could I have a example please? Just the code for the random numbers, I'll work out the rest myself.
Reply
#6

You want to set a different phone number for the players?
Use the random function,.
Example:

PHP код:
    new randphone 1000 random(9999);//Number.. 
In somewhere:

PHP код:
format(stringsizeof(string), "Cellphone purchased, your new phone number is %d."randphone); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)