Raised This Month: $ Target: $400
 0% 

2 questions


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Casio
Member
Join Date: Jan 2005
Old 04-18-2005 , 17:19  
Reply With Quote #4

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:
#include <amxmodx> #include <amxmisc> #include <fakemeta> #include <fun> #include <lang> #include <xs> new g_gagged[510]   // To store SteamID of who are gaged public gag(id, level, cid) {     if(!cmd_access(id, level, cid, 2))         return PLUGIN_HANDLED     new cmd[32], playerName[32]     read_argv(0, cmd, 31)     read_argv(1, playerName, 31)     remove_quotes(playerName)     // Search for the Player     new player_id = get_player(playerName)     new steamAgainst[32]     get_user_authid(player_id, steamAgainst, 31)     if(equal(cmd, "amx_gag"))     {         //g_gagged = g_gagged & "," & steamAgainst & ","         new len = strlen(g_gagged)         //g_gagged[len] = g_gagged[len] & "," & steamAgainst & ","         //g_gagged[len] = g_gagged[len] & "," & steamAgainst & ","         g_gagged[len] = g_gagged[len] + "," & steamAgainst + ","     } }

I cannot get the hang of the indexes in the variables , can you tell me is my modified code anywhere near correct?
Casio is offline
 



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


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