Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Jakub0381 - zdjęcie

Jakub0381

Rejestracja: 05.03.2021
Aktualnie: Nieaktywny
Poza forum Ostatnio: 10.03.2021 22:32
-----

Moje posty

W temacie: Vip

08.03.2021 11:49

Podaj kod w odpowiednich tagach lub załączniku

W temacie: Vip

08.03.2021 11:48

W załączniku

W temacie: Vip

07.03.2021 17:18

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <hamsandwich> 
#include <cstrike> 
 
#pragma semicolon 1
 
forward amxbans_admin_connect(id);
native cod_get_user_xp(id);
native cod_set_user_xp(id, value);
 
new const PLUGIN[] = "VIP-COD";
new const VERSION[] = "1.0";
new const AUTHOR[] = "KoRrNiK";
 
new const modelNAMETT[] = "modelTTVIP";
new const modelNAMECT[] = "modelCTVIP";
new const vipFlag[] = "q";
new const vipPrefix[] = "[Vip]";
new const additionalJump = 2;
new const additionalMoney = 2000;
new const additionalHsExp = 75;
new const additionalExp = 50;
new const additionalPercentDmg = 5;
 
public bool:isVip(id) return !!(has_flag(id, vipFlag));
 
new bool:userVip[33];
new userJump[33];
 
public plugin_precache(){
new gText[128];
 
format(gText, sizeof(gText) - 1, "models/player/%s/%s.mdl", modelNAMETT, modelNAMETT);
precache_model(gText);
format(gText, sizeof(gText) - 1, "models/player/%s/%s.mdl", modelNAMECT, modelNAMECT);
precache_model(gText);
}
 
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR);
 
register_clcmd("say /vip", "showInfoVip");
 
register_forward(FM_CmdStart, "cmdStart");
RegisterHam(Ham_Spawn, "player", "spawnHam", 1);
RegisterHam(Ham_TakeDamage, "player", "ham_TakeDamage");
register_event("DeathMsg", "deathMsg", "ade");
register_message(get_user_msgid("SayText"), "sayText");
register_message(get_user_msgid("ScoreAttrib"), "vipStatus");
}
 
 
public amxbans_admin_connect(id) set_task(0.1, "client_authorized_post", id);
public client_connect(id) set_task(0.1, "client_authorized_post", id);
 
public client_authorized_post(id){
 
if (isVip(id)){
new name[33];
get_user_name(id, name, sizeof(name) - 1 );
client_print_color(0, id, "^4---^1 Na serwer wchodzi Vip:^3 %s^4 ---", name);
userVip[id] = true;
} else userVip[id] = false;
}
 
public client_disconnect(id) userVip[id] = false;
 
public vipStatus(){
 
new id = get_msg_arg_int(1);
 
if (is_user_alive(id) || !userVip[id]) return PLUGIN_CONTINUE;
 
set_msg_arg_int(2, ARG_BYTE, get_msg_arg_int(2) | 4);
 
return PLUGIN_CONTINUE;
}
 
public cmdStart(id, uc_handle){
 
if (!is_user_alive(id)) return FMRES_IGNORED;
if (!userVip[id]) return FMRES_IGNORED;
 
static Float:velocity[3], button, oldButton, flags;
 
button = get_uc(uc_handle, UC_Buttons);
oldButton = pev(id, pev_oldbuttons);
flags = pev(id, pev_flags);
 
if ((button & IN_JUMP) && !(flags & FL_ONGROUND) && !(oldButton & IN_JUMP) && userJump[id]) {
userJump[id]--;
pev(id, pev_velocity, velocity);
velocity[2] = random_float(265.0, 285.0);
set_pev(id, pev_velocity, velocity);
} else {
if (flags & FL_ONGROUND) userJump[id] = additionalJump;
 
}
return FMRES_IGNORED;
 
}
 
public spawnHam(id){ 
 
if(!is_user_alive(id)) return;
if(!userVip[id]) return;
 
refreshModel(id);
 
userJump[id] = additionalJump;
 
}
 
public deathMsg(){
 
new killer = read_data(1);
new victim = read_data(2);
new hs = read_data(3);
 
if(killer == victim) return;
if(!userVip[killer]) return;
 
new newMoney = min(cs_get_user_money(killer) + additionalMoney, 16000);
cs_set_user_money(killer, newMoney);
cod_set_user_xp(killer, cod_get_user_xp(killer) + hs ? additionalHsExp : additionalExp);
 
}
 
public sayText(msgId,msgDest,msgEnt){
 
new id = get_msg_arg_int(1);
 
if (is_user_connected(id) && userVip[id]) {
new tempMessage[192], message[192], chatPrefix[64], steamId[33], playerName[32];
 
get_msg_arg_string(2, tempMessage, sizeof(tempMessage) - 1);
get_user_authid(id, steamId, sizeof(steamId) - 1);
 
format(chatPrefix, sizeof(chatPrefix) - 1, "^4%s", vipPrefix);
 
if (!equal(tempMessage, "#Cstrike_Chat_All")) {
add(message, sizeof(message) - 1, chatPrefix);
add(message, sizeof(message) - 1, " ");
add(message, sizeof(message) - 1, tempMessage);
} else {
get_user_name(id, playerName, sizeof(playerName) - 1);
 
get_msg_arg_string(4, tempMessage, sizeof(tempMessage) - 1);
set_msg_arg_string(4, "");
 
add(message, sizeof(message) - 1, chatPrefix);
add(message, sizeof(message) - 1, "^x03 ");
add(message, sizeof(message) - 1, playerName);
add(message, sizeof(message) - 1, "^x01 :  ");
add(message, sizeof(message) - 1, tempMessage);
}
 
set_msg_arg_string(2, message);
}
 
return PLUGIN_CONTINUE;
}
 
public ham_TakeDamage(victim, inflictor, attacker, Float:damage, damagebits){
 
if(!pev_valid(victim) || !is_user_connected(attacker)) return HAM_IGNORED;
if(!is_user_alive(attacker) || !is_user_alive(victim) ) return HAM_IGNORED;
if(!userVip[attacker]) return HAM_IGNORED;
if(victim == attacker) return HAM_SUPERCEDE;
 
damage *= (100 + additionalPercentDmg) / 100;
 
SetHamParamFloat(4, damage);
 
return HAM_IGNORED;
}
 
public refreshModel(id) {
if(!is_user_alive(id)) return;
 
switch(get_user_team(id) ){
case 1: cs_set_user_model(id, modelNAMETT);
case 2: cs_set_user_model(id, modelNAMECT) ;
 
}
}
 
public showInfoVip(id){
show_motd(id, "opis_vip.txt", "Opis VIP'a");
}

W temacie: Ranga Vip

06.03.2021 14:31

Moglbyktos mi przerobic ten plugin zeby nie bylo tego xp wiecej z vipa chyba ze potrafi ktos to naprawic 

W temacie: Ranga Vip

05.03.2021 21:10

//Edit odjelo lv nie z winy vipa  i na vipie daje 175xp czyli dobrze za 1 razem ajk sie zabija a potem juz w ogole xp nie daje