AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   HELP : Knife Admin Human (https://forums.alliedmods.net/showthread.php?t=272248)

dr hicham 09-26-2015 16:24

HELP : Knife Admin Human
 
Hi All :)
I'Need Plugin Knife Admin Human
Plz Help Me :( And Thanks

BN Houssam 09-26-2015 16:41

Re: HELP : Knife Admin Human
 
Jarab Hadi

PHP Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "PlayBoy"
#pragma semicolon 0

enum eModels
{
    
View,
    
Player
};


new const 
g_szModels[eModels][] = 
{
    
"models/GD_BaseBuilder/GD_v_Admin_Knife.mdl",
    
"models/GD_BaseBuilder/GD_v_Admin_Knife.mdl"
};


public 
plugin_precache()
{
    for(new 
eModelseModels0eModelsi++)        
        
precache_model(g_szModels[i]);
}


public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
         
register_event("CurWeapon""EventCurWeapon""be""1=29");
}


public 
client_authorized(id)
{
    if(
is_user_admin(id))
    
        
g_bIsAdmin[id] = true;
        
    else
        
g_bIsAdmin[id] = false;
}
    
public 
EventCurWeapon(id)
{
    if(
g_bIsAdmin[id])
    {    
        
set_pev(idpev_viewmodel2g_szModels[View]);
        
set_pev(idpev_weaponmodel2g_szModels[Player]);
    }
    return 
PLUGIN_CONTINUE;



Hartmann 09-26-2015 16:48

Re: HELP : Knife Admin Human
 
Quote:

Originally Posted by BN Houssam (Post 2347298)
Jarab Hadi

PHP Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "PlayBoy"
#pragma semicolon 0

enum eModels
{
    
View,
    
Player
};


new const 
g_szModels[eModels][] = 
{
    
"models/GD_BaseBuilder/GD_v_Admin_Knife.mdl",
    
"models/GD_BaseBuilder/GD_v_Admin_Knife.mdl"
};


public 
plugin_precache()
{
    for(new 
eModelseModels0eModelsi++)        
        
precache_model(g_szModels[i]);
}


public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
         
register_event("CurWeapon""EventCurWeapon""be""1=29");
}


public 
client_authorized(id)
{
    if(
is_user_admin(id))
    
        
g_bIsAdmin[id] = true;
        
    else
        
g_bIsAdmin[id] = false;
}
    
public 
EventCurWeapon(id)
{
    if(
g_bIsAdmin[id])
    {    
        
set_pev(idpev_viewmodel2g_szModels[View]);
        
set_pev(idpev_weaponmodel2g_szModels[Player]);
    }
    return 
PLUGIN_CONTINUE;



https://forums.alliedmods.net/showpo...92&postcount=3

EDIT: and write in English.

BN Houssam 09-26-2015 16:55

Re: HELP : Knife Admin Human
 
Yes I Fixed It :3

Hartmann 09-26-2015 17:03

Re: HELP : Knife Admin Human
 
Quote:

Originally Posted by BN Houssam (Post 2347304)
Yes I Fixed It :3

You forgot copy:

PHP Code:

#include <fakemeta> 

PHP Code:

new boolg_bIsAdmin[33]; 

...

dr hicham 09-26-2015 17:12

Re: HELP : Knife Admin Human
 
Not Working :(

Hartmann 09-26-2015 17:40

Re: HELP : Knife Admin Human
 
Quote:

Originally Posted by dr hicham (Post 2347315)
Thanks Houssam Is Working :)

How works, if you can not compile?

Code:

AMX Mod X Compiler 1.8.3-manual
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2013 AMX Mod X Team

plugin.sma(34) : warning 217: loose indentation
plugin.sma(42) : error 017: undefined symbol "g_bIsAdmin"
plugin.sma(42) : warning 217: loose indentation
plugin.sma(42) : warning 215: expression has no effect
plugin.sma(42) : error 001: expected token: ";", but found "]"
plugin.sma(42) : error 029: invalid expression, assumed zero
plugin.sma(42) : fatal error 107: too many error messages on one line

Compilation aborted.
4 Errors.

I think it's your profile, and you have another 2-3 profile on forum.

BN Houssam 09-26-2015 19:00

Re: HELP : Knife Admin Human
 
:( Hicham Hh walhila 7CHOMA 3LIK RAH FIHA 4 ERROR OU NTA TGOli WORCKING !!!

dr hicham 09-26-2015 19:26

Re: HELP : Knife Admin Human
 
Houssam Nsit raha makhdamach rah ghir kont kantfla

Chihab Eddine 09-27-2015 10:42

Re: HELP : Knife Admin Human
 
Like Hartmann say
You forgot
Try This

Quote:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR ""
#pragma semicolon 0

new bool: g_bIsAdmin[33];
enum eModels
{
View,
Player
};


new const g_szModels[eModels][] =
{
"models/v_Admin_Knife.mdl",
"models/p_Admin_Knife.mdl"
};


public plugin_precache()
{
for(new eModels: i = eModels: 0; i < eModels; i++)
precache_model(g_szModels[i]);
}


public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("CurWeapon", "EventCurWeapon", "be", "1=29");
}


public client_authorized(id)
{
if(is_user_admin(id))

g_bIsAdmin[id] = true;

else
g_bIsAdmin[id] = false;
}

public EventCurWeapon(id)
{
if(g_bIsAdmin[id])
{
set_pev(id, pev_viewmodel2, g_szModels[View]);
set_pev(id, pev_weaponmodel2, g_szModels[Player]);
}
return PLUGIN_CONTINUE;
}


All times are GMT -4. The time now is 05:41.

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