My script
Hi, i'm extremly new to Small and its bynaries and syntax (confused already :cry:) Here's my code so far :
Code:
#include <amxmodx>Ive figured at tht i have to use get_user_name (tell me if im wrong) Example: u type in console : "amx_urstupid kasc" and it would say in HUD : "|R3VO| Kasc has just been called stupid by |R3VO| Kasc" Please help Thanks |
Code:
|
nice,
okay idea, my first plugin (my only plugin) was one that makes the person fire their weapon BTW: Avalanche, does your avatar change with every post I read of yours? :?: |
what is AMX_HELP??
|
Quote:
what Freecode is gently trying to tell you is that you need to use one of the Admin Level Constants |
Thanks avalnche, could you possibly tell me how every thing else works, theres no point in my claiming it my own unless i dont know how it works :P
|
Read thru AMX Mod X doc... (Scripting Part)
|
Okay i ahve a problem now :D
I get this: [ 26] unknown unknown unknown amx_urstupid.am bad load Load fails: Plugin file open error (plugin "amx_urstupid.amxx" and the code: Code:
|
Plugin file open error means it couldn't find the file. Did you spell it wrong? Did you place it in the plugins directory?
Anyway, an explanation. We created the variable arg to contain our string. We then use read_argv to grab the first argument (that's what the 1 is for), we also specify the variable to store it in and how many characters to store it for (take the size of the string and subtract 1, the last character is reserved). Then we create a new variable, player, to hold the player index of our target. We use cmd_target to find that index. The first parameter, id, is the index of who is calling the command. The second parameter is the string that contains our text, and the last parameter is certain flags. We use if(!player) to figure out if we there was no match. If that is the case, player is 0, so it will return false. It will also print out some text to the console automatically. We then return PLUGIN_HANDLED to stop the rest of our code. We then create some variables to hold our names and grab 'em, one variable for the person who called the command and one variable for the target. We then use client_print to display it to everyone! |
| All times are GMT -4. The time now is 09:53. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.