Raised This Month: $ Target: $400
 0% 

newbie confused


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
twistedeuphoria
Veteran Member
Join Date: Jul 2004
Old 10-20-2004 , 11:06  
Reply With Quote #10

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.
__________________
twistedeuphoria 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 17:15.


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