Zapdos1, We (I) can't understand you!
Mxnn:
Code:
#include <amxmodx>
#include <amxmisc>
public plugin_init()
{
register_concmd("myfunction", "cmdMyFunction", ADMIN_LEVEL_B, "<name>")
}
public cmdMyFunction(id,level,cid)
{
if( !cmd_access(id,level,cid,2) ) // Does the person have access and did they supply an input?
{ // If not, cmd_access() returns an appropriate message for you.
return PLUGIN_HANDLED
}
new szArg[32], iTarget
read_argv(1, szArg, 31)
iTarget = cmd_target(id, szArg, CMDTARGET_ALLOW_SELF) // Find the player if he exists.
if(iTarget)
{
// Player found. Do stuff here.
}
return PLUGIN_HANDLED
}
I don't know what Zapdos1 said to you but Loose indentation means that you use an inconsistent indentation style. Use either a tab or a fixed number of spaces for each indentation (never vary!).
Quote:
Originally Posted by Mxnn
if i put amx_desconfig max (my name in the server is MAXIIIIIIIIIIIIIIIII) in the console appears "Invalid user name", then i put my name complete and works.. :/
|
find_player() is case sensitive by default.
__________________