Raised This Month: $51 Target: $400
 12% 

ADMIN acces


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Zaidbt
Senior Member
Join Date: Jun 2014
Location: Morroco
Old 07-08-2015 , 23:57   ADMIN acces
Reply With Quote #1

i'm trying to show a menu after X sec after Round begin
PHP Code:
#include <amxmodx>      
#include <fun>      
#include <cstrike>     
#include <hamsandwich>   
#include <engine>   
#include <fakemeta>

#define PLUGIN "VIP MENU"
#define VERSION "1.2"
#define AUTHOR "ZaidBt" 

public plugin_init()     
{  
register_pluginPLUGINVERSIONAUTHOR ); 
register_logevent("LogEvent_Round_Start"2"1=Round_Start")

public 
Event_HLTV_New_Round() 

set_task12.0 "weapon")
}

public 
weapon(id)
{
new 
menu menu_create"weapon""menu_handler" );    
menu_additemmenu" y M4 w [ Mouse2]""");  
menu_additemmenu"y bwglock18""");  
menu_additemmenu"y Galting""");  
menu_additemmenu"y thunderbolt""");  
menu_additemmenu"y Balrog""");  
    
menu_setpropmenuMPROP_EXITMEXIT_ALL )          
menu_displayidmenu
    
}     

public 
menu_handleridmenuitem )     
{        

    
    switch( 
item )     
    {     
        case 
0:     
        {     
                  
client_print(idprint_center"You have selected M4 Super weapon")
                  new 
szName[32]
                  
get_user_nameid szName charsmax szName ) ) 

                  
client_cmd(id,"amx_sw_m4 ^"%s^" give"szName)
        }     
        case 
1:     
        {     
                 
client_cmd(id,"admin_get_bwglock18")
                  
client_print(idprint_center"Nothing here")
        }     
        case 
2:     
        {    
                
client_cmd(id,"admin_get_gatling")  
                  
client_print(idprint_center"Nothing here")
        } 
        case 
3:     
        {     
                
client_cmd(id,"admin_get_thunderbolt")
                  
client_print(idprint_center"Nothing here")
        } 
              case 
4:     
        {     
                
client_cmd(id,"admin_get_balrog3")
                  
client_print(idprint_center"Nothing here")
        } 

        case 
MENU_EXIT:     
        {     
        
client_printidprint_chat"You exited the menu " )     
        }     
    }     
    
    
    
menu_destroymenu )     
    return 
PLUGIN_HANDLED     

But nothing Appears O.o , Where is the error please ? Ty
__________________
http://steamcommunity.com/profiles/76561198044821965
=========Working On Naruto Mod========
Zaidbt is offline
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 07-09-2015 , 00:38   Re: Set Task Probleme
Reply With Quote #2

The problem is here

PHP Code:
register_logevent("LogEvent_Round_Start"2"1=Round_Start")

public 
Event_HLTV_New_Round() //event _hltv _new_round ? llol it should be LogEvent_Round_Start

set_task12.0 "weapon")

Change to

PHP Code:

register_logevent
("LogEvent_Round_Start"2"1=Round_Start")

public 
LogEvent_Round_Start() 

set_task12.0 "weapon")


Last edited by indraraj striker; 07-09-2015 at 00:38.
indraraj striker is offline
Zaidbt
Senior Member
Join Date: Jun 2014
Location: Morroco
Old 07-09-2015 , 00:44   Re: Set Task Probleme
Reply With Quote #3

That do crash Server , i already tdid try it
Quote:
MSG_ON or MSG_ON_NRELIABLE with NO TARGET ENTITY
So that means the call do existe , something wrong about id or something ?
__________________
http://steamcommunity.com/profiles/76561198044821965
=========Working On Naruto Mod========

Last edited by Zaidbt; 07-09-2015 at 00:46.
Zaidbt is offline
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 07-09-2015 , 00:56   Re: Set Task Probleme
Reply With Quote #4

Check now :
Attached Files
File Type: sma Get Plugin or Get Source (vip_saz.sma - 463 views - 2.4 KB)
indraraj striker is offline
Zaidbt
Senior Member
Join Date: Jun 2014
Location: Morroco
Old 07-09-2015 , 01:07   Re: Set Task Probleme
Reply With Quote #5

Thx bro for saving my brain !
__________________
http://steamcommunity.com/profiles/76561198044821965
=========Working On Naruto Mod========
Zaidbt is offline
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 07-09-2015 , 01:11   Re: Set Task Probleme
Reply With Quote #6

np (Y)
indraraj striker is offline
Zaidbt
Senior Member
Join Date: Jun 2014
Location: Morroco
Old 07-09-2015 , 02:34   Re: [SOLVED]Set Task Probleme
Reply With Quote #7

UMG , How Is It possible To Allow It Only for admins with flag : ADMIN_LEVEL_H , And CT team only ? x)
PHP Code:
set_task12.0 "weapon"ADMIN_LEVEL_H
PHP Code:
public weapon(idlevelcid)
{
     if (!
cmd_access(idlevelcid3))
        return 
PLUGIN_HANDLED
     
return PLUGIN_HANDLED

I know that cid is only for Cl_cmd that need a target i try to edit it but nothing lél
__________________
http://steamcommunity.com/profiles/76561198044821965
=========Working On Naruto Mod========
Zaidbt is offline
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 07-09-2015 , 02:55   Re: ADMIN acces
Reply With Quote #8

here you go:
Attached Files
File Type: sma Get Plugin or Get Source (vip_saz.sma - 453 views - 2.5 KB)

Last edited by indraraj striker; 07-12-2015 at 12:07.
indraraj striker is offline
Zaidbt
Senior Member
Join Date: Jun 2014
Location: Morroco
Old 07-09-2015 , 07:34   Re: ADMIN acces
Reply With Quote #9

Ty Bro , it works , and i only dont wanna Start so many theards at the same time x)
__________________
http://steamcommunity.com/profiles/76561198044821965
=========Working On Naruto Mod========
Zaidbt is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-09-2015 , 20:12   Re: ADMIN acces
Reply With Quote #10

This is the Scripting Help forum, not the Request forum.
__________________
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:36.


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