2 questions
I have a couple of questions here and I am hoping someone will be kind enough to take a few seconds to answer them for me.
Ok here we go. 1. In Visual Basic they are 2 commands "replace()" and "instr()". The "replace()" command searches a variable for a string and if it is found it replaces that string with another string. The "instr()" command searches a variable for a string and returns where abouts in the variable the string occurs. Please can anyone tell me the SMALLTALK equivalents of these 2 commands? and if they are any example uses of them in an AMXX plugin somewhere? 2. Is there an online list where I can find all the commands for SMALLTALK? I can't understand the include files that well lol. Much thankyou in advance. Casio. |
Hah, well, first off, the language AMXX is using is not SmallTalk, but Small (C). Most of the language is a subset of the famous C programming language.
Also note that the language itslef doesn't provide any functions -- all "natives" are provided either by the AMXX core or by one of the modules. http://www.amxmodx.org/funcwiki.php?go=func&id=45 <-- equivalent of InStr Replacing all occurencies: You'd have to do a loop I think; Or you can just use xs_replace from xs.inc ;) |
Awesome! :D :D thankx for these PM you are the man! 8)
I am planning on using these commands to modify the "gag" command in ADMINMODX to compensate for a minor flaw in its design which allows the the gagged player, to ungag themself. I don't know if posting exploits is allowed here so I won't point it out. P.S I do mean the "gag" command not the "shutup" command 8) . |
Typical nothing is as easy as I imagine it to be lol.
Ok, my idea is when an admin gags a player, their STEAMID (surrounded by commas ( , ) ) is stored in a huge string variable and when that player speaks, the code will search that huge string variable for the player's STEAMID and if it is found then block the chat. Unfortunately since I am relatively new to this language I am having difficulty handling the string variables at the point where I am trying to add the steamid to the huge string variable. Here is what I have tryed so far (using most of the author's existing code, I said I was new to this :p): Code:
I cannot get the hang of the indexes in the variables :( , can you tell me is my modified code anywhere near correct? |
| All times are GMT -4. The time now is 10:00. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.