Raised This Month: $ Target: $400
 0% 

When String Contain " " (Backslash)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 08-05-2010 , 09:45   When String Contain " " (Backslash)
Reply With Quote #1

Hello AM,

I try to get the message, the Player write in Chat. When the Message Contains a Backslash i wanna do something.

I had the idea to chekc if the string contains a " " but i dont know how.

Heres my code:

PHP Code:
#include <amxmodx>  
public plugin_init()  
{  
    
register_clcmd("say /wordhere""cmdWord")  
    
register_clcmd("_mm_wordhere""mmWord")  
}  

public 
cmdWord(id)  
{  
    
client_cmd(id"messagemode _mm_wordhere")  
}  

public 
mmWord(id)  
{  
    new 
szTemp[64]  
    
read_args(szTempcharsmax(szTemp))  
    
remove_quotes(szTemp)
    if(
szTemp contains " ")
    { do 
that }
    else { do 
that }

Please help me
__________________
Quote:
#define true ((rand() % 2)? true: false) //Happy debugging suckers
mottzi is offline
Send a message via MSN to mottzi
 



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 00:15.


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