AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   kk need some help with admin mods (https://forums.alliedmods.net/showthread.php?t=29142)

tarre 05-30-2006 16:04

kk need some help with admin mods
 
hmm how to make so all admins gets sv_gravity 300 and sv_friction -100
//Sry if wrong forum :)..

//Tarre[/code]

tarre 05-30-2006 17:36

please help fast :S?! ;P

VEN 05-30-2006 18:16

Code:
set_pev(index, pev_gravity, 300.0 / get_cvar_num("sv_gravity")  /* ? */) set_pev(index, pev_friction, get_cvar_num("sv_friction") - 100 /* ? */)

tarre 05-30-2006 18:29

hmmm like this?

Code:

#include <amxmodx>
#include <amxmisc>

public plugin_init()
{
register_plugin( "Silent pwnage", "1.0", "T A R R E" );
}
set_pev(index, pev_gravity, 300.0 / get_cvar_num("sv_gravity")  /* ? */)
set_pev(index, pev_friction, get_cvar_num("sv_friction") - 100 /* ? */)

is m

tarre 05-30-2006 18:35

bah getting error :S

Quote:

/home/users/amxmodx/tmp3/phpK9bwc7.sma(8) : error 010: invalid function or declaration
/home/users/amxmodx/tmp3/phpK9bwc7.sma(8) : error 021: symbol already defined: "get_cvar_num"
/home/users/amxmodx/tmp3/phpK9bwc7.sma(9) : error 021: symbol already defined: "set_pev"
/home/users/amxmodx/tmp3/phpK9bwc7.sma(9) : error 010: invalid function or declaration
/home/users/amxmodx/tmp3/phpK9bwc7.sma(9) : warning 203: symbol is never used: "set_pev"
[/code]

Deviance 05-30-2006 19:12

need to include fakemeta

example code:

Code:
#include <amxmodx> #include <amxmisc> #include <fakemeta> public plugin_init() {    register_plugin( "Silent pwnage", "1.0", "T A R R E" );    register_concmd("amx_somecommand","cmd_change",ADMIN_LEVEL_A," - Give's all admins higher grav/friction") } public cmd_change(id, level, cid) {      if (!cmd_access(id, level, cid, 1))         return PLUGIN_HANDLED          for(new i=1;i<get_playersnum();i++)      {         if(is_user_admin(i))     {         set_pev(i, pev_gravity, 300.0 / get_cvar_num("sv_gravity")  /* ? */)         set_pev(i, pev_friction, get_cvar_num("sv_friction") - 100 /* ? */)     }      }            return PLUGIN_HANDLED }

tarre 05-30-2006 19:45

hmm :'( dont working Unkonwn plugin, and 1 more error
Quote:

home/users/amxmodx/tmp3/phpPhS2LK.sma(8) : warning 217: loose indentation

Deviance 05-30-2006 19:50

Quote:

Originally Posted by tarre
hmm :'( dont working Unkonwn plugin, and 1 more error
Quote:

home/users/amxmodx/tmp3/phpPhS2LK.sma(8) : warning 217: loose indentation

[correction]warning[/correction]

w/e i fixed it try now

Xanimos 05-30-2006 19:55

Formatted right. Also I know if fun set_user_gravity() it has to be divided by 800 is it a different case for the FM way?

Code:
#include <amxmodx> #include <amxmisc> #include <fakemeta> public plugin_init() {     register_plugin( "Silent pwnage", "1.0", "T A R R E" );     register_concmd("amx_somecommand","cmd_change",ADMIN_LEVEL_A," - Give's all admins higher grav/friction") } public cmd_change(id, level, cid) {     if (!cmd_access(id, level, cid, 1))         return PLUGIN_HANDLED         for(new i=1;i<get_playersnum();i++)     {         if(is_user_admin(i))         {             set_pev(i, pev_gravity, 300.0 / get_cvar_num("sv_gravity")  /* ? */)             set_pev(i, pev_friction, get_cvar_num("sv_friction") - 100 /* ? */)         }     }     return PLUGIN_HANDLED }

tarre 05-30-2006 19:59

Quote:

Originally Posted by Doombringer
Quote:

Originally Posted by tarre
hmm :'( dont working Unkonwn plugin, and 1 more error
Quote:

home/users/amxmodx/tmp3/phpPhS2LK.sma(8) : warning 217: loose indentation

[correction]warning[/correction]

w/e i fixed it try now

nej det funkar inte det står bara unkown FE l
vad e felet?
jag lägger först .sma filen i scripting sen gjorde så blev det en .amxx fil som jag la i plugins mappen, och öppnade plugins.ini sen sätta fil namnet där silent_admin.amxx utan ; framför,

"Förklarade bäst på svenska"


All times are GMT -4. The time now is 16:30.

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