How can I make a specific thing save random numbers? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How can I make a specific thing save random numbers? (
/showthread.php?tid=391604)
How can I make a specific thing save random numbers? -
davelord - 11.11.2012
Title, basically. For example, how can I save a specific define, (Score, or whatever), save random numbers?
Re: How can I make a specific thing save random numbers? -
-=Dar[K]Lord=- - 11.11.2012
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
Re: How can I make a specific thing save random numbers? -
[HK]Ryder[AN] - 11.11.2012
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
Re: How can I make a specific thing save random numbers? -
UnknownGamer - 11.11.2012
You can use this vairable, if needed?
Uses STRMID, and STRLEN.
pawn Код:
strmid(PlayerInfo[playerid][myvairable], "Code", 0, strlen("Code"), 999);
Re: How can I make a specific thing save random numbers? -
davelord - 14.11.2012
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.
Respuesta: How can I make a specific thing save random numbers? -
ThePhenix - 14.11.2012
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(string, sizeof(string), "Cellphone purchased, your new phone number is %d.", randphone);