AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to make these commands to user level h (https://forums.alliedmods.net/showthread.php?t=157123)

alien100 05-16-2011 16:03

How to make these commands to user level h
 
Hello, how to make these 2 to user level h

and with gravity like player van use it only 5 seconds per round

HTML Code:

public GravityCMD(id)
{
    if(!NoGravity[id])
    {
          set_user_gravity(id, 0.70);         
        client_print(id, print_chat, "[VIP] Gravity changed.")
          NoGravity[id] = true;
    }
    else
    {
          set_user_gravity(id, 0.80);
        client_print(id, print_chat, "[VIP] Gravity changed.")
          NoGravity[id] = false;
    }
}

public Ham_UseButton( iEnt, iAttacker, Float:fDamage, Float:vDirection[3], TraceHandle, iDamageBits ) {
        dllfunc(DLLFunc_Use, iEnt, iAttacker)
}


fysiks 05-17-2011 02:09

Re: How to make these commands to user level h
 
Hint: (get_user_flags(player_entity_index) & ADMIN_LEVEL_H) returns true when the player has flag "t". If you mean flag "h" from users.ini then change ADMIN_LEVEL_H to ADMIN_CFG.

alien100 05-18-2011 05:03

Re: How to make these commands to user level h
 
hmm i don't understandt

Aykay 05-18-2011 06:18

Re: How to make these commands to user level h
 
amx_addadmin "name" "t" when they're in the server.

fysiks 05-18-2011 14:04

Re: How to make these commands to user level h
 
Quote:

Originally Posted by alien100 (Post 1471414)
hmm i don't understandt

PHP Code:

if( (get_user_flags(player_entity_index) & ADMIN_LEVEL_H) )
{
    
// player_entity_index has flag "t", let them do stuff


Quote:

Originally Posted by Aykay (Post 1471431)
amx_addadmin "name" "t" when they're in the server.

That has nothing to do with his question.

alien100 05-19-2011 10:02

Re: How to make these commands to user level h
 
hmm.... // error 017: undefined symbol "player_entity_index"

Exolent[jNr] 05-19-2011 14:08

Re: How to make these commands to user level h
 
Quote:

Originally Posted by alien100 (Post 1472024)
hmm.... // error 017: undefined symbol "player_entity_index"

It's an example.
Understand it to apply it to your code, instead of copy/pasting.


All times are GMT -4. The time now is 04:27.

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