+- +-

+-User

Welcome, Guest.
Please login or register.
 
 
 

Login with your social network

Forgot your password?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Welcome Me

Pages: [1]
1
Suggestions/Request / Re: i need plugin
« on: May 06, 2019, 09:39:30 am »
Use This Code:-
Code: [Select]
#include <amxmodx>
#include <amxmisc>
#include <engine>

#define ADMINACCESS ADMIN_LEVEL_H

new jumpnum[33] = 0
new bool:dojump[33] = false

public plugin_init()
{
register_plugin("MultiJump","1.1","twistedeuphoria")
register_cvar("amx_maxjumps","3")
register_cvar("amx_mjadminonly","1")
}

public client_putinserver(id)
{
jumpnum[id] = 0
dojump[id] = false
}

public client_disconnect(id)
{
jumpnum[id] = 0
dojump[id] = false
}

public client_PreThink(id)
{
if(!is_user_alive(id)) return PLUGIN_CONTINUE
if(get_cvar_num("amx_mjadminonly") && (!access(id,ADMINACCESS))) return PLUGIN_CONTINUE
new nbut = get_user_button(id)
new obut = get_user_oldbutton(id)
if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))
{
if(jumpnum[id] < get_cvar_num("amx_maxjumps"))
{
dojump[id] = true
jumpnum[id]++
return PLUGIN_CONTINUE
}
}
if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
{
jumpnum[id] = 0
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}

public client_PostThink(id)
{
if(!is_user_alive(id)) return PLUGIN_CONTINUE
if(get_cvar_num("amx_mjadminonly") && (!access(id,ADMINACCESS))) return PLUGIN_CONTINUE
if(dojump[id] == true)
{
new Float:velocity[3]
entity_get_vector(id,EV_VEC_velocity,velocity)
velocity[2] = random_float(265.0,285.0)
entity_set_vector(id,EV_VEC_velocity,velocity)
dojump[id] = false
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}


2
Mod For Counter Strike 1.6 / Re: Pub-Nite BattleGrounds Mod
« on: April 20, 2019, 02:16:22 am »
EPIC MOD I WAS SEARCHING FOR THIS MOD SINCE FOREVER

THANK YOU EFFFx AND DON KHAN FOR THIS MOD

3
Approved Plugins / Player Model 1.0
« on: March 25, 2019, 11:16:36 pm »
Hello guys.

i have a plugin which i created and my some friends help me to make it.

the plugin name is Player Model.

by this plugin you can set the models for players in model.ini in cstrike/addons/amxmodx/configs for example.

Code: [Select]
; replace default skins
;"defaultname" "newname"

; set skin according to steamid
;"STEAM_0:1:23456789" "terrorist_model" "ct_model"
;"BOT" "bot_te_model" "bot_ct_model"

Plugin Created By Me.

DON KHAN For Fix Some Bugs.

Code: [Select]
// #define SET_MODELINDEX

#include <amxmodx>
#include <fakemeta>

#define VERSION "1.0"

#define SetUserModeled(%1) g_bModeled |= 1<<(%1 & 31)
#define SetUserNotModeled(%1) g_bModeled &= ~( 1<<(%1 & 31) )
#define IsUserModeled(%1) ( g_bModeled &  1<<(%1 & 31) )

#define SetUserConnected(%1) g_bConnected |= 1<<(%1 & 31)
#define SetUserNotConnected(%1) g_bConnected &= ~( 1<<(%1 & 31) )
#define IsUserConnected(%1) ( g_bConnected &  1<<(%1 & 31) )

#define MAX_MODEL_LENGTH 16
#define MAX_AUTHID_LENGTH 25

#define MAX_PLAYERS 32

#define ClCorpse_ModelName 1
#define ClCorpse_PlayerID 12

#define m_iTeam 114
#define g_ulModelIndexPlayer 491
#define fm_cs_get_user_team_index(%1) get_pdata_int(%1, m_iTeam)

new const MODEL[] = "model";
new g_bModeled;
new g_szCurrentModel[MAX_PLAYERS+1][MAX_MODEL_LENGTH];

new Trie:g_tTeamModels[2];
new Trie:g_tModelIndexes;
new Trie:g_tDefaultModels;

new g_szAuthid[MAX_PLAYERS+1][MAX_AUTHID_LENGTH];
new g_bPersonalModel[MAX_PLAYERS+1];

new g_bConnected;

public plugin_init()
{
register_plugin("Players Models", VERSION, "Welcome Me");

register_forward(FM_SetClientKeyValue, "SetClientKeyValue");
register_message(get_user_msgid("ClCorpse"), "Message_ClCorpse");
}

public plugin_precache()
{
new szConfigFile[128];
get_localinfo("amxx_configsdir", szConfigFile, charsmax(szConfigFile));
format(szConfigFile, charsmax(szConfigFile), "%s/players_models.ini", szConfigFile);

new iFile = fopen(szConfigFile, "rt");
if( iFile )
{
new const szDefaultModels[][] = {"", "urban", "terror", "leet", "arctic", "gsg9",
"gign", "sas", "guerilla", "vip", "militia", "spetsnaz" };
g_tDefaultModels = TrieCreate();
for(new i=1; i<sizeof(szDefaultModels); i++)
{
TrieSetCell(g_tDefaultModels, szDefaultModels[i], i);
}

g_tModelIndexes = TrieCreate();

g_tTeamModels[0] = TrieCreate();
g_tTeamModels[1] = TrieCreate();

new szDatas[70], szRest[40], szKey[MAX_AUTHID_LENGTH], szModel1[MAX_MODEL_LENGTH], szModel2[MAX_MODEL_LENGTH];
while( !feof(iFile) )
{
fgets(iFile, szDatas, charsmax(szDatas));
trim(szDatas);
if(!szDatas[0] || szDatas[0] == ';' || szDatas[0] == '#' || (szDatas[0] == '/' && szDatas[1] == '/'))
{
continue;
}

parse(szDatas, szKey, charsmax(szKey), szModel1, charsmax(szModel1), szModel2, charsmax(szModel2));

if( TrieKeyExists(g_tDefaultModels, szKey) )
{
if( szModel1[0] && !equal(szModel1, szKey) && PrecachePlayerModel(szModel1) )
{
TrieSetString(g_tDefaultModels, szKey, szModel1);
}
}
else if( equal(szKey, "STEAM_", 6) || equal(szKey, "BOT") )
{
parse(szRest, szModel1, charsmax(szModel1), szModel2, charsmax(szModel2));
if( szModel1[0] && PrecachePlayerModel(szModel1) )
{
TrieSetString(g_tTeamModels[1], szKey, szModel1);
}
if( szModel2[0] && PrecachePlayerModel(szModel2) )
{
TrieSetString(g_tTeamModels[0], szKey, szModel2);
}
}
}
fclose( iFile );
}
}

PrecachePlayerModel( const szModel[] )
{
if( TrieKeyExists(g_tModelIndexes, szModel) )
{
return 1;
}

new szFileToPrecache[64];
formatex(szFileToPrecache, charsmax(szFileToPrecache), "models/player/%s/%s.mdl", szModel, szModel);
if( !file_exists( szFileToPrecache ) && !TrieKeyExists(g_tDefaultModels, szModel) )
{
return 0;
}

TrieSetCell(g_tModelIndexes, szModel, precache_model(szFileToPrecache));

formatex(szFileToPrecache, charsmax(szFileToPrecache), "models/player/%s/%st.mdl", szModel, szModel);
if( file_exists( szFileToPrecache ) )
{
precache_model(szFileToPrecache);
return 1;
}
formatex(szFileToPrecache, charsmax(szFileToPrecache), "models/player/%s/%sT.mdl", szModel, szModel);
if( file_exists( szFileToPrecache ) )
{
precache_model(szFileToPrecache);
return 1;
}

return 1;
}

public plugin_end()
{
TrieDestroy(g_tTeamModels[0]);
TrieDestroy(g_tTeamModels[1]);
TrieDestroy(g_tModelIndexes);
TrieDestroy(g_tDefaultModels);
}

public client_authorized( id )
{
get_user_authid(id, g_szAuthid[id], MAX_AUTHID_LENGTH-1);

for(new i=1; i<=2; i++)
{
if( TrieKeyExists(g_tTeamModels[2-i], g_szAuthid[id]) )
{
g_bPersonalModel[id] |= i;
}
else
{
g_bPersonalModel[id] &= ~i;
}
}
}

public client_putinserver(id)
{
if( !is_user_hltv(id) )
{
SetUserConnected(id);
}
}

public client_disconnect(id)
{
g_bPersonalModel[id] = 0;
SetUserNotModeled(id);
SetUserNotConnected(id);
}

public SetClientKeyValue(id, const szInfoBuffer[], const szKey[], const szValue[])
{
if( equal(szKey, MODEL) && IsUserConnected(id) )
{
new iTeam = fm_cs_get_user_team_index(id);
if( 1 <= iTeam <= 2 )
{
new szSupposedModel[MAX_MODEL_LENGTH];

if( g_bPersonalModel[id] & iTeam )
{
TrieGetString(g_tTeamModels[2-iTeam], g_szAuthid[id], szSupposedModel, charsmax(szSupposedModel));
}
else
{
TrieGetString(g_tDefaultModels, szValue, szSupposedModel, charsmax(szSupposedModel));
}

if( szSupposedModel[0] )
{
if( !IsUserModeled(id)
|| !equal(g_szCurrentModel[id], szSupposedModel)
|| !equal(szValue, szSupposedModel) )
{
copy(g_szCurrentModel[id], MAX_MODEL_LENGTH-1, szSupposedModel);
SetUserModeled(id);
set_user_info(id, MODEL, szSupposedModel);
#if defined SET_MODELINDEX
new iModelIndex;
TrieGetCell(g_tModelIndexes, szSupposedModel, iModelIndex);
// set_pev(id, pev_modelindex, iModelIndex); // is this needed ?
set_pdata_int(id, g_ulModelIndexPlayer, iModelIndex);
#endif
return FMRES_SUPERCEDE;
}
}

if( IsUserModeled(id) )
{
SetUserNotModeled(id);
g_szCurrentModel[id][0] = 0;
}
}
}
return FMRES_IGNORED;
}

public Message_ClCorpse()
{
new id = get_msg_arg_int(ClCorpse_PlayerID);
if( IsUserModeled(id) )
{
set_msg_arg_string(ClCorpse_ModelName, g_szCurrentModel[id]);
}
}

Get model.ini File:- https://www.mediafire.com/file/eupcd2k8r2ebtp6/players_models.ini/file
Get Plugin:- https://www.mediafire.com/file/9nxb6g32cv2oowz/players_models.amxx/file
Get Source Code:- https://www.mediafire.com/file/eonrdo5tb68watl/players_models.sma/file

4
Scripting Help / Re: [Helping] Can't Compile A Plugin
« on: March 25, 2019, 10:03:31 am »
Thanks DON KHAN

5
Scripting Help / [Solved] Can't Compile A Plugin
« on: March 25, 2019, 08:17:29 am »
Hello.

I have a plugin which i scripted by collecting rss from some and got help by some friends but i cant compile it. can anybody fix its problem??

Plugin is for Players model

Code: [Select]
// #define SET_MODELINDEX

#include <amxmodx>
#include <fun>

#define VERSION "1.0"

#define SetUserModeled(%1) g_bModeled |= 1<<(%1 & 31)
#define SetUserNotModeled(%1) g_bModeled &= ~( 1<<(%1 & 31) )
#define IsUserModeled(%1) ( g_bModeled &  1<<(%1 & 31) )

#define SetUserConnected(%1) g_bConnected |= 1<<(%1 & 31)
#define SetUserNotConnected(%1) g_bConnected &= ~( 1<<(%1 & 31) )
#define IsUserConnected(%1) ( g_bConnected &  1<<(%1 & 31) )

#define MAX_MODEL_LENGTH 16
#define MAX_AUTHID_LENGTH 25

#define MAX_PLAYERS 32

#define ClCorpse_ModelName 1
#define ClCorpse_PlayerID 12

#define m_iTeam 114
#define g_ulModelIndexPlayer 491
#define fm_cs_get_user_team_index(%1) get_pdata_int(%1, m_iTeam)

new const MODEL[] = "model";
new g_bModeled;
new g_szCurrentModel[MAX_PLAYERS+1][MAX_MODEL_LENGTH];

new Trie:g_tTeamModels[2];
new Trie:g_tModelIndexes;
new Trie:g_tDefaultModels;

new g_szAuthid[MAX_PLAYERS+1][MAX_AUTHID_LENGTH];
new g_bPersonalModel[MAX_PLAYERS+1];

new g_bConnected;

public plugin_init()
{
register_plugin("Players Models", VERSION, "Welcome Me");

register_forward(FM_SetClientKeyValue, "SetClientKeyValue");
register_message(get_user_msgid("ClCorpse"), "Message_ClCorpse");
}

public plugin_precache()
{
new szConfigFile[128];
get_localinfo("amxx_configsdir", szConfigFile, charsmax(szConfigFile));
format(szConfigFile, charsmax(szConfigFile), "%s/players_models.ini", szConfigFile);

new iFile = fopen(szConfigFile, "rt");
if( iFile )
{
new const szDefaultModels[][] = {"", "urban", "terror", "leet", "arctic", "gsg9",
"gign", "sas", "guerilla", "vip", "militia", "spetsnaz" };
g_tDefaultModels = TrieCreate();
for(new i=1; i<sizeof(szDefaultModels); i++)
{
TrieSetCell(g_tDefaultModels, szDefaultModels[i], i);
}

g_tModelIndexes = TrieCreate();

g_tTeamModels[0] = TrieCreate();
g_tTeamModels[1] = TrieCreate();

new szDatas[70], szRest[40], szKey[MAX_AUTHID_LENGTH], szModel1[MAX_MODEL_LENGTH], szModel2[MAX_MODEL_LENGTH];
while( !feof(iFile) )
{
fgets(iFile, szDatas, charsmax(szDatas));
trim(szDatas);
if(!szDatas[0] || szDatas[0] == ';' || szDatas[0] == '#' || (szDatas[0] == '/' && szDatas[1] == '/'))
{
continue;
}

parse(szDatas, szKey, charsmax(szKey), szModel1, charsmax(szModel1), szModel2, charsmax(szModel2));

if( TrieKeyExists(g_tDefaultModels, szKey) )
{
if( szModel1[0] && !equal(szModel1, szKey) && PrecachePlayerModel(szModel1) )
{
TrieSetString(g_tDefaultModels, szKey, szModel1);
}
}
else if( equal(szKey, "STEAM_", 6) || equal(szKey, "BOT") )
{
parse(szRest, szModel1, charsmax(szModel1), szModel2, charsmax(szModel2));
if( szModel1[0] && PrecachePlayerModel(szModel1) )
{
TrieSetString(g_tTeamModels[1], szKey, szModel1);
}
if( szModel2[0] && PrecachePlayerModel(szModel2) )
{
TrieSetString(g_tTeamModels[0], szKey, szModel2);
}
}
}
fclose( iFile );
}
}

PrecachePlayerModel( const szModel[] )
{
if( TrieKeyExists(g_tModelIndexes, szModel) )
{
return 1;
}

new szFileToPrecache[64];
formatex(szFileToPrecache, charsmax(szFileToPrecache), "models/player/%s/%s.mdl", szModel, szModel);
if( !file_exists( szFileToPrecache ) && !TrieKeyExists(g_tDefaultModels, szModel) )
{
return 0;
}

TrieSetCell(g_tModelIndexes, szModel, precache_model(szFileToPrecache));

formatex(szFileToPrecache, charsmax(szFileToPrecache), "models/player/%s/%st.mdl", szModel, szModel);
if( file_exists( szFileToPrecache ) )
{
precache_model(szFileToPrecache);
return 1;
}
formatex(szFileToPrecache, charsmax(szFileToPrecache), "models/player/%s/%sT.mdl", szModel, szModel);
if( file_exists( szFileToPrecache ) )
{
precache_model(szFileToPrecache);
return 1;
}

return 1;
}

public plugin_end()
{
TrieDestroy(g_tTeamModels[0]);
TrieDestroy(g_tTeamModels[1]);
TrieDestroy(g_tModelIndexes);
TrieDestroy(g_tDefaultModels);
}

public client_authorized( id )
{
get_user_authid(id, g_szAuthid[id], MAX_AUTHID_LENGTH-1);

for(new i=1; i<=2; i++)
{
if( TrieKeyExists(g_tTeamModels[2-i], g_szAuthid[id]) )
{
g_bPersonalModel[id] |= i;
}
else
{
g_bPersonalModel[id] &= ~i;
}
}
}

public client_putinserver(id)
{
if( !is_user_hltv(id) )
{
SetUserConnected(id);
}
}

public client_disconnect(id)
{
g_bPersonalModel[id] = 0;
SetUserNotModeled(id);
SetUserNotConnected(id);
}

public SetClientKeyValue(id, const szInfoBuffer[], const szKey[], const szValue[])
{
if( equal(szKey, MODEL) && IsUserConnected(id) )
{
new iTeam = fm_cs_get_user_team_index(id);
if( 1 <= iTeam <= 2 )
{
new szSupposedModel[MAX_MODEL_LENGTH];

if( g_bPersonalModel[id] & iTeam )
{
TrieGetString(g_tTeamModels[2-iTeam], g_szAuthid[id], szSupposedModel, charsmax(szSupposedModel));
}
else
{
TrieGetString(g_tDefaultModels, szValue, szSupposedModel, charsmax(szSupposedModel));
}

if( szSupposedModel[0] )
{
if( !IsUserModeled(id)
|| !equal(g_szCurrentModel[id], szSupposedModel)
|| !equal(szValue, szSupposedModel) )
{
copy(g_szCurrentModel[id], MAX_MODEL_LENGTH-1, szSupposedModel);
SetUserModeled(id);
set_user_info(id, MODEL, szSupposedModel);
#if defined SET_MODELINDEX
new iModelIndex;
TrieGetCell(g_tModelIndexes, szSupposedModel, iModelIndex);
// set_pev(id, pev_modelindex, iModelIndex); // is this needed ?
set_pdata_int(id, g_ulModelIndexPlayer, iModelIndex);
#endif
return FMRES_SUPERCEDE;
}
}

if( IsUserModeled(id) )
{
SetUserNotModeled(id);
g_szCurrentModel[id][0] = 0;
}
}
}
return FMRES_IGNORED;
}

public Message_ClCorpse()
{
new id = get_msg_arg_int(ClCorpse_PlayerID);
if( IsUserModeled(id) )
{
set_msg_arg_string(ClCorpse_ModelName, g_szCurrentModel[id]);
}
}

Thanks in advance

6
Mod For Counter Strike 1.6 / Re: Base Builder v9.2 Created By DON KHAN
« on: March 24, 2019, 06:52:45 am »
Thank You Very Much DON KHAN  8)

I Was Searching For Base Builder Version Update And I Got From You.

7
Request For Grade In Forum / [Closed][Request] Grade In Forum
« on: March 23, 2019, 01:48:42 am »
* Name: Owais Khan
* Contact (Gmail,Facebook): -
* Which Grade Do You Wanna Here: Global ModeratoR
* How Much You Know About Scripting (1-100%): 40%
* Are You Agree To Help Everyone When They Post (Yes/No): Yes
* Will You Respect Your Elders (Yes/No): Yes
* Which Program We Use To Turn The .sma File To .amxx File: Compiler
* Which Section Do You Wanna Moderate: Suggestion/Request Plugins & Scripting Help

Pages: [1]

+-Recent Topics

5 ways to make money from playing games by Martha Louise
February 21, 2023, 01:47:19 am

Need mod :/ by bacem
October 13, 2019, 05:49:09 am

Rules by DON KHAN
August 28, 2019, 01:50:29 pm

[REQ] VIP are knife and all see this by DON KHAN
August 20, 2019, 12:56:37 pm

Advance VIP Menu [Public, CSDM & Furien] by DON KHAN
June 22, 2019, 11:50:05 am

For Umbrella Swarm mod by DON KHAN
June 22, 2019, 08:13:26 am

[ZP] VIP Model by DON KHAN
June 17, 2019, 08:57:35 am

[ZP] SVIP Plugin by DON KHAN
June 13, 2019, 11:43:24 am

Updates / Helpful BBC Codes For Your Post by DON KHAN
June 09, 2019, 03:01:39 am

BHOP Script by DON KHAN
June 08, 2019, 01:40:41 pm