Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
public plugin_init(){
register_plugin("inviso","1.0","Carl/svendude")
register_concmd("amx_inviso","cmdinviso",ADMIN_BAN,"<name or #userid>")
return PLUGIN_CONTINUE
}
public cmdinviso(id, level, cid)
{
if (!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED
set_user_rendering(id,kRenderTransTexture,255,0,0,kRenderNormal,25)
return PLUGIN_HANDLED
}
Alright, what this is gonna do is make the person who uses the command invisible(I think, don't know kRenderTransTexture). What you want to do is get the target player and to do that add this:
Code:
new target[32],tid //Declare the variables
read_args(target,31) //<<<< Since you only have one thing that changes in the command (the player) you can read the whole string.
tid = cmd_target(id,target,8) // A very useful function...check out the function area on the front page for flags.
if(!tid) //Check if the player is valid
return PLUGIN_HANDLED
So add that right after your return if they don't have enough access and change "id" in set_user_rendering to "tid" and it should work correctly.
__________________