Raised This Month: $51 Target: $400
 12% 

Knife Skin with access or steam id


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
znakosss
Member
Join Date: Jun 2013
Location: Greece
Old 05-24-2020 , 12:32   Knife Skin with access or steam id
Reply With Quote #1

Hello guys i was looking for a plugin like this https://forums.alliedmods.net/showthread.php?t=106094
but for a knife model any ideas??
Thnx u

Last edited by znakosss; 05-24-2020 at 12:32.
znakosss is offline
tarsisd2
Veteran Member
Join Date: Feb 2016
Location: brazil
Old 05-24-2020 , 12:52   Re: Knife Skin with access or steam id
Reply With Quote #2

https://forums.alliedmods.net/showthread.php?t=293632
tarsisd2 is offline
znakosss
Member
Join Date: Jun 2013
Location: Greece
Old 05-24-2020 , 12:56   Re: Knife Skin with access or steam id
Reply With Quote #3

Quote:
Originally Posted by tarsisd2 View Post
i want with access or steam id , no with commands and not for all players
znakosss is offline
Kosidone
Member
Join Date: Aug 2014
Old 05-24-2020 , 15:26   Re: Knife Skin with access or steam id
Reply With Quote #4

try this one

Code:
#include <amxmodx>
#include <fakemeta>
#include <cstrike>

new const g_ModelKnifeCT[] = "models/vip/v_knife.mdl"
new const g_ModelKnifeTE[] = "models/vip/v_knife.mdl"

public plugin_init()
{
register_plugin("VIP Knife models", "1.1", "Daminou")

register_event("CurWeapon", "model_knife", "b")
}

public plugin_precache()
{
precache_model(g_ModelKnifeCT)
precache_model(g_ModelKnifeTE)
}

public model_knife(id)
{
if(is_user_alive(id) && is_user_connected(id) & get_user_flags(id) & ADMIN_RCON)
{
new clip, ammo
new knife = get_user_weapon(id, clip, ammo)
if(knife == CSW_KNIFE)
{
switch(cs_get_user_team(id))
{
case CS_TEAM_CT:
{
set_pev(id, pev_viewmodel2, g_ModelKnifeCT)
}
case CS_TEAM_T:
{
set_pev(id, pev_viewmodel2, g_ModelKnifeTE)
}
}
}
}
Kosidone is offline
AnimalMonster
Senior Member
Join Date: May 2020
Old 05-24-2020 , 15:31   Re: Knife Skin with access or steam id
Reply With Quote #5

Quote:
Originally Posted by znakosss View Post
i want with access or steam id , no with commands and not for all players
the one he gave you link from wass perfect, have you even read description? flag means acces. flag c - kick acces as example.
AnimalMonster is offline
znakosss
Member
Join Date: Jun 2013
Location: Greece
Old 05-24-2020 , 15:31   Re: Knife Skin with access or steam id
Reply With Quote #6

i get the model download from the server but nothing

not worked but thanks

any other ideas ?
znakosss is offline
znakosss
Member
Join Date: Jun 2013
Location: Greece
Old 05-24-2020 , 15:37   Re: Knife Skin with access or steam id
Reply With Quote #7

Quote:
Originally Posted by AnimalMonster View Post
the one he gave you link from wass perfect, have you even read description? flag means acces. flag c - kick acces as example.
I read the description but i want a plugin without shows any menus and commands

i just want the knife load automatic when you login on the server.

and add the model on the specific player by steam id or access

but thanks for the idea

Last edited by znakosss; 05-24-2020 at 15:38.
znakosss is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-24-2020 , 16:09   Re: Knife Skin with access or steam id
Reply With Quote #8

Code:
#include <amxmodx> #include <fakemeta> #if !defined MAX_PLAYERS const MAX_PLAYERS = 32 #endif #if !defined MAX_AUTHID_LENGTH     const MAX_AUTHID_LENGTH = 64 #endif new const KNIFE_V_MODEL[] = "models/v_your_knife_model.mdl" new const KNIFE_P_MODEL[] = "models/p_your_knife_model.mdl" new const KNIFE_STEAMID_LIST[][] = {     "INSERT STEAM ID HERE",     "INSERT STEAM ID HERE",     "INSERT STEAM ID HERE",     "INSERT STEAM ID HERE" } new Trie:g_tSteamIds, bool:g_bMatch[MAX_PLAYERS + 1] public plugin_init() {     register_plugin("Knife by SteamID", "1.0", "OciXCrom")     register_event("CurWeapon", "OnWeaponChange", "be", "1=1", "2=29")     g_tSteamIds = TrieCreate()     for(new i; i < sizeof(KNIFE_STEAMID_LIST); i++)     {         TrieSetCell(g_tSteamIds, KNIFE_STEAMID_LIST[i], 1)     } } public plugin_end() {     TrieDestroy(g_tSteamIds) } public plugin_precache() {     precache_model(KNIFE_V_MODEL)     precache_model(KNIFE_P_MODEL) } public client_authorized(id) {     new szAuthId[MAX_AUTHID_LENGTH]     get_user_authid(id, szAuthId, charsmax(szAuthId))     g_bMatch[id] = TrieKeyExists(g_tSteamIds, szAuthId) } public OnWeaponChange(id) {     if(g_bMatch[id])     {         set_pev(id, pev_viewmodel2, KNIFE_V_MODEL)         set_pev(id, pev_weaponmodel2, KNIFE_P_MODEL)     } }
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
znakosss
Member
Join Date: Jun 2013
Location: Greece
Old 05-24-2020 , 16:38   Re: Knife Skin with access or steam id
Reply With Quote #9

Quote:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team

Error: Invalid expression, assumed zero on line 18
Error: Must be a constant expression; assumed zero on line 18

2 Errors.
Could not locate output file C:\program1\cstrike\addons\amxmodx\scripting\ include\knife_mod.amx (compile failed).
znakosss is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-24-2020 , 17:08   Re: Knife Skin with access or steam id
Reply With Quote #10

The code I provided compiles properly. You either removed the quotes or the comma in the list. Show your code.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
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 17:50.


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