SA-MP Forums Archive
Number sa-mp format (000-000) ? - 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: Number sa-mp format (000-000) ? (/showthread.php?tid=575078)



Number sa-mp format (000-000) ? - Metharon - 23.05.2015

http://stackoverflow.com/questions/4...numbers-in-php


How can i use it in pawn ?


AW: Number sa-mp format (000-000) ? - Kaliber - 23.05.2015

You mean sth like this:

PHP код:
print(ConvertNumber("+11234567890"));
//-> 123-456-7890
stock ConvertNumber(const string[]) {
    new 
buffer[15];
    
strcat(buffer,string),strdel(buffer,0,2);
    
strins(buffer,"-",3,sizeof buffer);
    
strins(buffer,"-",7,sizeof buffer);
    return 
buffer;

Greekz