Snippet for IP - 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: Snippet for IP (
/showthread.php?tid=574934)
Snippet for IP -
Deathlane - 22.05.2015
Is there a snippet that gets the first 2 digits of an IP? For example, instead of getting "127.0.0.1", I get "127.0".
If there is, please paste it below.
Thanks in advance!
Re: Snippet for IP -
Vince - 22.05.2015
Use sscanf's array specifier and split by dot.
Re: Snippet for IP -
Deathlane - 22.05.2015
Quote:
Originally Posted by Vince
Use sscanf's array specifier and split by dot.
|
Thanks, forgot about that one!
(Can't give rep anymore, sorry)