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
 

Zdjęcie

Vip


  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
4 odpowiedzi w tym temacie

#1 Jakub0381

    Początkujący

  • Użytkownik

Reputacja: 0
Nowy

  • Postów:14
  • Imię:Jakub
  • Lokalizacja:Kraków
Offline

Napisano 07.03.2021 17:16

Witam mógłby ktoś pomóc naprawić plugin na vipa nie działa zwiększony dmg pieniądze dodatkowe zamienic nie zeby dawalo z konca rundy tylko za killa i cos jest zepsute z dodatkowym xp cod mod jest 50 za killa i 75 za hs i 100 normalnie w pluginie cod moda i jak sie zdobedzie 175 xp na klasie to juz nie daje pd 


  • +
  • -
  • 0

#2 Jakub0381

    Początkujący

  • Autor tematu
  • Użytkownik

Reputacja: 0
Nowy

  • Postów:14
  • Imię:Jakub
  • Lokalizacja:Kraków
Offline

Napisano 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");
}

  • +
  • -
  • 0

#3 Misiu.

    Kochanek DarkGL

  • Power User

Reputacja: 174
Profesjonalista

  • Postów:539
  • GG:
  • Steam:steam
  • Imię:Adrian
  • Lokalizacja:Zgorzelec
Offline

Napisano 08.03.2021 09:51

Podaj kod w odpowiednich tagach lub załączniku


  • +
  • -
  • 0

PoGrywamy.pl - Pograj Razem Z Nami

 

Tatusiek serwerów:

[ONLY DD2 #2] 1shot2kill.pl

[ONLY DD2] PoGrywamy.pl

Przyjmuje płatne zlecenia!


#4 Jakub0381

    Początkujący

  • Autor tematu
  • Użytkownik

Reputacja: 0
Nowy

  • Postów:14
  • Imię:Jakub
  • Lokalizacja:Kraków
Offline

Napisano 08.03.2021 11:48

W załączniku


  • +
  • -
  • 0

#5 Jakub0381

    Początkujący

  • Autor tematu
  • Użytkownik

Reputacja: 0
Nowy

  • Postów:14
  • Imię:Jakub
  • Lokalizacja:Kraków
Offline

Napisano 08.03.2021 11:49

Podaj kod w odpowiednich tagach lub załączniku

Załączone pliki


  • +
  • -
  • 0




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych