Raised This Month: $ Target: $400
 0% 

Retrive a last numbers after ':' from SteamID


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 05-08-2013 , 18:48   Retrive a last numbers after ':' from SteamID
Reply With Quote #1

Hey, i need a some help to separate the numbers of SteamID;

example:

PHP Code:
new szSteam[35];
get_user_authid(id,szSteam,charsmax(szSteam));  // Its will return my Steam: STEAM_0:1:20326844

new szLeft[16],szRight[16];
    
strtok(szSteam,szLeft,charsmax(szLeft),szRight,charsmax(szRight),':');

server_print(szRight); // Its will return ":20326844" 
Any suggestion?

Ps. I used search but not really a useful results

EDIT:

I used this method and problem solved:

PHP Code:
    new szLeft[16],szRight[16];
    
strtok(szSteam,szLeft,charsmax(szLeft),szRight,charsmax(szRight),':');
    
strtok(szRight,szLeft,charsmax(szLeft),szRight,charsmax(szRight),':');
    
    
server_print(szRight); 
But its another better way?
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 

Last edited by ^SmileY; 05-08-2013 at 18:56.
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:51.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode