Raised This Month: $ Target: $400
 0% 

How to make the menu for all players!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tanayraj
Member
Join Date: Sep 2011
Location: India
Old 06-01-2013 , 01:01   How to make the menu for all players!
Reply With Quote #1

Hey! I have this plugin which is just for admins.I want to make the plugin open for all.Please help! Thanks!

PHP Code:

 
    
    
if (idplayers[0] = id; else get_players(playerscount"ch"); 
    { 
        for ( new 
0counti++ ) 
        { 
            if (
is_user_connected(players[i]) ) 
            { 
                
message_begin(MSG_ONE_UNRELIABLEg_MsgSayText    _players[i]); 
                
write_byte(players[i]); 
                
write_string(msg); 
                
message_end(); 
            } 
        } 
    } 

__________________
__________________________________________
Add on steam -TaAaZZ28
Site -www.tanayr.com

Last edited by tanayraj; 06-01-2013 at 03:44. Reason: [Solved] Full Code Added
tanayraj is offline
Send a message via Skype™ to tanayraj
~Ice*shOt
Veteran Member
Join Date: Mar 2009
Location: Lithuania
Old 06-01-2013 , 01:55   Re: How to make the menu for all players!
Reply With Quote #2

PHP Code:
public PlayAnimation(id

    if (
get_user_flags(id) & ADMIN_IMMUNITY && is_user_alive(id)) 
    { 
        
menu_display(idg_animMenu
        return 
PLUGIN_HANDLED 
    

    else 
        
ChatColor(id"^4[JailBreak ExD]^1 You do not have access to this command"); 

    return 
PLUGIN_HANDLED 

>>>

PHP Code:
public PlayAnimation(id

    if (
is_user_alive(id)) 
    { 
        
menu_display(idg_animMenu
        return 
PLUGIN_HANDLED 
    
}
    return 
PLUGIN_HANDLED 

~Ice*shOt is offline
Send a message via Skype™ to ~Ice*shOt
tanayraj
Member
Join Date: Sep 2011
Location: India
Old 06-01-2013 , 01:57   Re: How to make the menu for all players!
Reply With Quote #3

Quote:
Originally Posted by ~Ice*shOt View Post
PHP Code:
public PlayAnimation(id

    if (
get_user_flags(id) & ADMIN_IMMUNITY && is_user_alive(id)) 
    { 
        
menu_display(idg_animMenu
        return 
PLUGIN_HANDLED 
    

    else 
        
ChatColor(id"^4[JailBreak ExD]^1 You do not have access to this command"); 

    return 
PLUGIN_HANDLED 

>>>

PHP Code:
public PlayAnimation(id

    if (
is_user_alive(id)) 
    { 
        
menu_display(idg_animMenu
        return 
PLUGIN_HANDLED 
    
}
    return 
PLUGIN_HANDLED 

This is crashing the server! I have edited the post see the full code
__________________
__________________________________________
Add on steam -TaAaZZ28
Site -www.tanayr.com
tanayraj is offline
Send a message via Skype™ to tanayraj
Haskyutza
Junior Member
Join Date: May 2013
Location: Romania
Old 06-01-2013 , 01:58   Re: How to make the menu for all players!
Reply With Quote #4

You must delete just this thing
PHP Code:
if (get_user_flags(id) & ADMIN_IMMUNITY
so, this is your code

PHP Code:
public PlayAnimation(id

    if (
is_user_alive(id)) 
    
menu_display(idg_animMenu


public 
StartDance(idanim

    new 
seqDesc[SEQ_DESC
    
ArrayGetArray(g_iDataanimseqDesc
     
    new 
ent g_playerData[id][ENT_ANIM
    new 
modelEnt g_playerData[id][ENT_MODEL
    
set_pev(entpev_framerate1.0
    
set_pev(entpev_sequenceanim
    
set_pev(entpev_gaitsequenceanim
     
    new 
Float:origin[3], Float:mins[3
    
pev(idpev_originorigin
    
pev(idpev_minsmins
     
    
mins[0] = origin[0
    
mins[1] = origin[1
    
mins[2] += origin[2
    
set_pev(entpev_originmins
     
    
set_pev(modelEntpev_effects0
    new 
model[64
    
get_user_info(id"model"model63
    
format(model63"models/player/%s/%s.mdl"modelmodel
    
engfunc(EngFunc_SetModelmodelEntmodel
     
    
set_pev(modelEntpev_bodypev(idpev_body)) 
    
set_pev(modelEntpev_skinpev(idpev_skin)) 
     
    
set_pev(entpev_controller_0128
    
set_pev(entpev_controller_1128
     
    
pev(idpev_anglesmins
    
mins[0] = 0.0 
    set_pev
(entpev_anglesmins
    
set_pev(entpev_v_anglemins
     
    
engfunc(EngFunc_SetViewidg_playerData[id][ENT_CAM]) 
    
g_playerData[id][ANIM_PLAYING] = 
     
    set_pev
(idpev_effectsEF_NODRAW
     


public 
StopDance(id

    
set_pev(g_playerData[id][ENT_MODEL], pev_effectsEF_NODRAW
    
g_playerData[id][ANIM_PLAYING] = 
    set_pev
(idpev_effects0
     
    
engfunc(EngFunc_SetViewidid


public 
Dance_MenuHandler(idmenuitem

    if(
item == MENU_EXIT
        return 
PLUGIN_HANDLED 
     
    
new access[32
    
get_pcvar_string(g_cvarAccessFlagaccess31
     
    if (!(
pev(idpev_flags) & FL_ONGROUND)) 
    { 
        
ChatColor(id"^4[Jailbreak ExD] ^1You have to be ^3 in the countryi ^1you're using this option!!")   
        return 
PLUGIN_HANDLED 
    

     
    
StartDance(iditem
     
    
menu_display(idg_animMenufloatround(item/7.0floatround_floor)) 
     
    return 
PLUGIN_HANDLED 

Haskyutza is offline
tanayraj
Member
Join Date: Sep 2011
Location: India
Old 06-01-2013 , 02:07   Re: How to make the menu for all players!
Reply With Quote #5

The menu opened but when i tried a move the server crashed!
__________________
__________________________________________
Add on steam -TaAaZZ28
Site -www.tanayr.com

Last edited by tanayraj; 06-01-2013 at 02:08.
tanayraj is offline
Send a message via Skype™ to tanayraj
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 06-01-2013 , 06:04   Re: How to make the menu for all players!
Reply With Quote #6

Quote:
Originally Posted by tanayraj View Post
The menu opened but when i tried a move the server crashed!
What are you trying to do? Why have you removed code from your post?
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet 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 16:25.


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