Raised This Month: $ Target: $400
 0% 

Removing from String


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Depresie
Veteran Member
Join Date: Nov 2013
Old 07-26-2017 , 10:12   Re: Removing from String
Reply With Quote #1

Thanks, solved

PHP Code:
new szString[32] = "models/v_weapon.mdl"
replace(szStringcharsmax(szString), ".mdl""")
replace(szStringcharsmax(szString), "models/v_"""
__________________
Depresie is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 07-29-2017 , 12:46   Re: Removing from String
Reply With Quote #2

If the start position is known/constant, you can also do this:
PHP Code:
new szTest[] = "models/v_weapon.mdl";
    
szTestsizeofszTest ) - ] = EOS;
    
server_print"[%s]" szTest] ); 
Output:
Code:
[weapon]
__________________

Last edited by Bugsy; 07-29-2017 at 12:47.
Bugsy is offline
Reply



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 23:10.


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