AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   need a script (https://forums.alliedmods.net/showthread.php?t=164053)

K o T 08-06-2011 18:14

need a script
 
Code:

case 1:
        {
            if( is_user_alive( id ) )
            {
            set_user_health(id, 150),
            set_user_armor(id, 150)
            }
        }

case 2:
        {
            if( is_user_alive( id ) )
            {
            set_user_noclip(id, 1)
            }
        }

case 3:
        {
            if( is_user_alive( id ) )
            {
            set_user_rendering(id,kRenderFxNone, 0,0,0, kRenderTransAdd,3)
            set_user_godmode(id, 1)
            }
        }

I need a script to make it work

vonamoR 08-06-2011 20:59

Re: need a script
 
Quote:

Originally Posted by K o T (Post 1527230)
Code:

case 1:
        {
            if( is_user_alive( id ) )
            {
            set_user_health(id, 150), <-----
            set_user_armor(id, 150)
            }
        }

case 2:
        {
            if( is_user_alive( id ) )
            {
            set_user_noclip(id, 1)
            }
        }

case 3:
        {
            if( is_user_alive( id ) )
            {
            set_user_rendering(id,kRenderFxNone, 0,0,0, kRenderTransAdd,3)
            set_user_godmode(id, 1)
            }
        }

I need a script to make it work

Why is there a comma there? o.o

K o T 08-07-2011 04:06

Re: need a script
 
Quote:

Originally Posted by vonamoR (Post 1527301)
Why is there a comma there? o.o

Code:

public Spawn_player(id)
{
        if(is_user_alive(id) && is_user_connected(id))
        {
            set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderNormal,0)
            cs_set_user_armor(id, 0, CS_ARMOR_NONE)
            set_user_health( id, 100 )
            set_user_noclip(id, 0)
            set_user_godmode(id, 0)
        }
}

does not work with this
I do not put it so I need this piece of code to work

K o T 08-07-2011 04:43

Re: need a script
 
What I was missing some parts of the code


Quote:

{
menu = menu_create("cs_vipmenu", "menu_handler")

static players[32], num, name[32], cmd[5], itemtxt[90]

get_players(players, num)
for (new i; i < num; i++)
{
get_user_name(players[i], name, 31)

formatex(cmd, 4, "%i", players[i])
formatex(itemtxt, 89, "%s: %s", name, label[settings[players[i]]])

menu_additem(menu, itemtxt, cmd)
}

menu_display(id, menu, page)
return PLUGIN_CONTINUE
}

K o T 08-07-2011 04:47

Re: need a script
 
Quote:

case 1:
{
if( is_user_alive( id ) )
{
set_user_health(id, 150)
set_user_armor(id, 150)
}
}

case 2:
{
if( is_user_alive( id ) )
{
set_user_noclip(id, 1)
}
}

case 3:
{
if( is_user_alive( id ) )
{
set_user_rendering(id,kRenderFxNone, 0,0,0, kRenderTransAdd,3)
set_user_godmode(id, 1)
}
}

and is it to work in a place I do not script
I do not know how to do it

Quote:

public cmd_noclip(id,level,cid)
{
if(!cmd_access(id,level,cid,1))
return PLUGIN_HANDLED

set_user_noclip(id, 0)

return PLUGIN_HANDLED
}
how to get to work

noclip works but not how to do so not included on and off
I need a script for working noclip
script for health armor godmode invisibility separately

K o T 08-08-2011 01:19

Re: need a script
 
Quote:

public cmd_noclip(id,level,cid)
{
if(!cmd_access(id,level,cid,1))
{
set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderNormal,0)
set_view( id, 0 )
cs_set_user_armor(id, 0, CS_ARMOR_NONE)
set_user_maxspeed(id, 250.0)
set_user_gravity( id, 1.0 )
set_user_health( id, 100 )
set_user_noclip(id, 0)
set_user_godmode(id, 0)
}
}
I use this script my menu includes but when choose that only (armor + health off) others work wherein error how to make with the new choice or off they off

K o T 08-08-2011 01:43

Re: need a script
 
all matter is closed


All times are GMT -4. The time now is 23:53.

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