Raised This Month: $ Target: $400
 0% 

Scooping out pieces of a string


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
edeloa
Member
Join Date: Mar 2007
Location: Redwood City, Ca
Old 04-07-2007 , 02:42   Scooping out pieces of a string
Reply With Quote #1

Hey all,

My ultimate goal is to get the name of the weapon a user is holding. So for example, when a player is holding an AK47, I want to have a variable holding "AK47".

get_weaponname() does something similar ... only it adds "weapon_" in front of the name .... so the AK47 would look like "weapon_AK47".

I'm looking for a way to scoop out "AK47" from "weapon_AK47"

This is what I have so far....
Code:
new weapName[32]
get_weaponname(wepID, weapName, 32)
edeloa is offline
Send a message via AIM to edeloa Send a message via MSN to edeloa
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 04-07-2007 , 02:48   Re: Scooping out pieces of a string
Reply With Quote #2

Code:
client_print(0, print_chat, "%s", weapName[7]);
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
edeloa
Member
Join Date: Mar 2007
Location: Redwood City, Ca
Old 04-07-2007 , 04:17   Re: Scooping out pieces of a string
Reply With Quote #3

thanks, this is exactly what I needed
edeloa is offline
Send a message via AIM to edeloa Send a message via MSN to edeloa
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 06:42.


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