Raised This Month: $ Target: $400
 0% 

HELP ON|OFF


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
totalcsscripting
BANNED
Join Date: Jul 2010
Old 08-12-2010 , 22:49   HELP ON|OFF
Reply With Quote #1

I have this two functions,

PHP Code:
public plugin_init()
{
    
register_concmd("amx_ghost","admin_ghost"
    
register_concmd("amx_unghost","admin_unghost"
}

public 
admin_ghost(id,level,cid

    if (!
cmd_access(id,level,cid,1)) 
        return 
PLUGIN_HANDLED 
    
new params[3]
    
client_print(id,print_chat,"[TotalCS] Sos un fantasma!")
    
params[0] = id 
    IsGhost
[id] = 
    set_user_godmode
(id,1)
    
set_user_footsteps (id 1)
    
set_task(0.2"changecolor"BPID idparams2"b")
    return 
PLUGIN_HANDLED 


public 
admin_unghost(idlevelcid

    if (!
cmd_access(id,level,cid,1)) 
    return 
PLUGIN_HANDLED 
    IsGhost
[id] = 0
    client_print
(id,print_chat,"[TotalCS] Ya no sos un fantasma!")
    
set_user_godmode(id,0
    
set_user_footsteps (id 0)
    
set_user_rendering(id,kRenderFxNone,255,255,255kRenderNormal,16)
    
remove_task(BPID id
    return 
PLUGIN_HANDLED 

I want to replace this with a simple

amx_ghost <player> 1|0 for On|Off
totalcsscripting is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-12-2010 , 23:16   Re: HELP ON|OFF
Reply With Quote #2

So, what's the question? Have you even tried to do it yet? Show your code.

Hint: Look at other admin commands for examples of how to do the <player> part.
__________________
fysiks is offline
Reply



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 21:58.


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