Raised This Month: $ Target: $400
 0% 

<set_entity_visibility > It doesnt works "help&qu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Tyler_durden (gsr)
Junior Member
Join Date: Apr 2005
Old 06-25-2005 , 14:14   <set_entity_visibility > It doesnt works "help&qu
Reply With Quote #1

Hi I'am a total beginer , this is my first one
I trying to register multiple "say" commands , None of them works but in-game i can't figure out how to make them work

The menu thing is not registered yet so don't bother

Code:
#include <amxmodx> #include <amxmisc> #include <fun> public plugin_init() {    register_plugin("amx_say_hack","1.0","Tyler")       register_clcmd("say hackmenu","hackmenu",ADMIN_LEVEL_A,"<Opens Hack Menu>")    register_clcmd("hackmenu","hackmenu",ADMIN_LEVEL_A,"<Opens Hack Menu>")    register_clcmd("say /hack","hack",ADMIN_LEVEL_A,"<Gives invisibility,Hyspeed>")    register_clcmd("say /invisible","invisible",ADMIN_LEVEL_A,"<Gives invisibility>")    register_clcmd("say /Hspeed","Highspeed",ADMIN_LEVEL_A,"<gives High speed>")    register_clcmd("say /Hyspeed","Hyperspeed",ADMIN_LEVEL_A,"<Gives Hyper speed>")    register_clcmd("say /noclip","noclip",ADMIN_LEVEL_A,"<Gives Noclip>")    register_clcmd("say /Nohacks","Nomorehacks",ADMIN_LEVEL_A,"<All is back to normal")   }    public hack(id,lvl,cid) {     if(!cmd_access(id,lvl,cid,2)) {         return PLUGIN_HANDLED     }     if (get_cvar_num("amx_say_hack") !=0) {                 set_entity_visibility(id, 0) // Make person invisible     server_cmd("sv_maxspeed 99999999")     set_user_maxspeed(id,900.0)  // Make person run very fast         }     return PLUGIN_HANDLED } public invisible(id,lvl,cid) {     if(!cmd_access(id,lvl,cid,2)) {         return PLUGIN_HANDLED     }     if (get_cvar_num("amx_say_hack") !=0) {                 set_entity_visibility(id, 0) // Make person invisible         }     return PLUGIN_HANDLED } public hspeed(id,lvl,cid) {     if(!cmd_access(id,lvl,cid,2)) {         return PLUGIN_HANDLED     }     if (get_cvar_num("amx_say_hack") !=0) {                 server_cmd("sv_maxspeed 99999999")     set_user_maxspeed(id,750.0)  // Make person run fast         }     return PLUGIN_HANDLED } public hyspeed(id,lvl,cid) {     if(!cmd_access(id,lvl,cid,2)) {         return PLUGIN_HANDLED     }     if (get_cvar_num("amx_say_hack") !=0) {                 server_cmd("sv_maxspeed 99999999")     set_user_maxspeed(id,900.0)  // Make person run fast         }     return PLUGIN_HANDLED } public noclip(id,lvl,cid) {     if(!cmd_access(id,lvl,cid,2)) {         return PLUGIN_HANDLED     }     if (get_cvar_num("amx_say_hack") !=0) {                 set_user_noclip(id, 0)  // Player uses Noclip cheat         }     return PLUGIN_HANDLED } public Nomorehacks(id,lvl,cid) {     if(!cmd_access(id,lvl,cid,2)) {         return PLUGIN_HANDLED     }     if (get_cvar_num("amx_say_hack") !=0) {                 set_user_noclip(id, 0)  // Noclip is disabled     set_user_maxspeed(id,350.0)  // Speed back to normal     set_entity_visibility(id, 1) // Make person visible again     }     return PLUGIN_HANDLED }

Can someone help me figure out how to make someone invisible because it don't seem to work
Attached Files
File Type: sma Get Plugin or Get Source (amx_say_hack.sma - 107 views - 2.7 KB)
__________________
IM on xooit.xooit.com
Tyler_durden (gsr) is offline
Send a message via MSN to Tyler_durden (gsr)
WaZZeR++
Veteran Member
Join Date: Mar 2005
Location: Sweden
Old 06-25-2005 , 14:31  
Reply With Quote #2

you need to include the engine
Code:
#include <engine>
WaZZeR++ is offline
Send a message via MSN to WaZZeR++
Tyler_durden (gsr)
Junior Member
Join Date: Apr 2005
Old 06-25-2005 , 14:48  
Reply With Quote #3

ok i'll try this

edit: doesnt work I typed amx_help in console and i can't see my registered cmds
2. I double checked that the plugin was running
__________________
IM on xooit.xooit.com
Tyler_durden (gsr) is offline
Send a message via MSN to Tyler_durden (gsr)
WaZZeR++
Veteran Member
Join Date: Mar 2005
Location: Sweden
Old 06-25-2005 , 15:14  
Reply With Quote #4

you havnt register the cvar....
Code:
register_cvar("amx_say_hack","1")
WaZZeR++ is offline
Send a message via MSN to WaZZeR++
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 06-25-2005 , 22:58  
Reply With Quote #5

I've done that a few times myself.. ;o

Quote:
set_entity_visibility( entity, [ visible = 1 ] ) - If visible = 1, entity will be set to be visible, else invisible.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x 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 00:27.


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