View Single Post
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 08-16-2018 , 12:17   Re: Copy first 2 characters of a string into another string
Reply With Quote #4

Quote:
Originally Posted by edon1337 View Post
03 to be in szHour string and 43 in szMinutes string, note that we have to get rid of the first zeros.

Ex: 03:09 - > 3:9
new szHours[3], szMinutes[3] // 3rd = string terminator
num_to_str(str_to_num(szTime), szHours, charsmax(szHours));
num_to_str(str_to_num(szTime[2]), szMinutes, charsmax(szMinutes));
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM
Ghosted is offline