Raised This Month: $12 Target: $400
 3% 

SM strangenesses


Post New Thread Reply   
 
Thread Tools Display Modes
client21
Senior Member
Join Date: Apr 2013
Old 10-22-2018 , 16:18   Re: SM strangenesses
Reply With Quote #11

Quote:
Originally Posted by Powerlord View Post
For the TakeDamage part, if this is one of the Counter-Strike games, did either player have armor?
I test on bot, i think yes, maybe he buy armor, but anyway, it's stupid.

PHP Code:
PrintToServer("-> %d"StrContains("seriously?"""false)); 
-> 0


PHP Code:
new Handle:kv CreateKeyValues("");
KvJumpToKey(kv"chat"true);
KvSetNum(kv"x"1);
    
decl String:s[12];
s[0] = 0;
KvGetSectionName(kvssizeof(s));
PrintToServer("-> '%s'"s);
    
CloseHandle(kv); 
-> 'Chat'

Last edited by client21; 10-22-2018 at 16:19.
client21 is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 10-22-2018 , 17:13   Re: SM strangenesses
Reply With Quote #12

Quote:
Originally Posted by client21 View Post
I test on bot, i think yes, maybe he buy armor, but anyway, it's stupid.

PHP Code:
PrintToServer("-> %d"StrContains("seriously?"""false)); 
-> 0
That is correct, "" matches at the start of "seriously?", this is standard strstr behaviour.

Quote:
Originally Posted by client21 View Post
PHP Code:
new Handle:kv CreateKeyValues("");
KvJumpToKey(kv"chat"true);
KvSetNum(kv"x"1);
    
decl String:s[12];
s[0] = 0;
KvGetSectionName(kvssizeof(s));
PrintToServer("-> '%s'"s);
    
CloseHandle(kv); 
-> 'Chat'
Again, this is standard game behaviour - KeyValues keys are case-insensitively pooled, so if the game sees a key called "Chat" and then a key called "chat", only the first instance ("Chat") is stored for both.
__________________
asherkin is offline
Reply


Thread Tools
Display Modes

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 02:30.


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