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

Problem z drvip


  • Zamknięty Temat jest zamknięty
2 odpowiedzi w tym temacie

#1 krzywy92

    Zaawansowany

  • Zbanowany

Reputacja: 2
Nowy

  • Postów:85
  • Lokalizacja:gdansk
Offline

Napisano 04.09.2011 13:53

witam przejde od razu do zeczy...

Przerobilem sobie ten plugin praktycznie caly, tylko jest maly broblem. Dodalem teraz sobie podskoki w powietrzu i deagle z 1 nabojem. Problem polega na tym ze przestala mi dzialac w nim lewitacja dla vipa i nie moge zrobic ze tylko ct moze używać tych przywilejów... mecze sie z tym od 5 dni i nic nie moge zrobic.
Czy mogl by mi ktos to zrobic lub pomoc zeby dzialal spowrotem lewitacja i przywileje byly ylko dla ct ?
Zalaczam wycinek z .sma i proszę o szybka pomoc:

 
#include <amxmodx>
#include <fakemeta>
#include <fakemeta_util>
#include <hamsandwich>
#include <cstrike>
#include <amxmisc>
#include <fun>
 
#define PLUGIN_NAME "DeathrunVip"
#define PLUGIN_AUTHOR "Krzywy"
#define PLUGIN_VERSION "v1.0"
 
static const COLOR[] = "^x04"
static const CONTACT[] = ""
 
new maxplayers
new gmsgSayText
new deagle_on;
 
public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_AUTHOR, PLUGIN_VERSION);
 
register_event("ResetHUD","event_reset_hud","be");
register_event("ResetHUD", "resetModel", "b")
register_clcmd("say /vip","admin_motd",0,"- Shows the MOTD.")
 
register_clcmd("say", "handle_say")
register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)
deagle_on = register_cvar("deagle_on", "1", ADMIN_CVAR);
gmsgSayText = get_user_msgid("SayText")
register_forward(FM_CmdStart, "CmdStart");
 
maxplayers = get_maxplayers()
 
return PLUGIN_CONTINUE
 
}
 
public plugin_precache() {
precache_model("models/player/smith/smith.mdl")
precache_model("models/player/smith/smith.mdl")
 
return PLUGIN_CONTINUE
}
 
public resetModel(id, level, cid) {
if (get_user_flags(id) & ADMIN_CVAR) {
new CsTeams:userTeam = cs_get_user_team(id)
if (userTeam == CS_TEAM_T) {
cs_set_user_model(id, "smith")
}
else if(userTeam == CS_TEAM_CT) {
cs_set_user_model(id, "smith")
}
else {
cs_reset_user_model(id)
}
}
 
return PLUGIN_CONTINUE
}
 
 
public event_reset_hud(id)
{
if(!is_user_connected(id))
return PLUGIN_CONTINUE;
 
client_print(id, print_chat, "[Przystankersi.xaa.pl] Wpisz w say /vip i zobacz jakie ma przywileje.")
 
if(!access(id,ADMIN_CVAR))
return PLUGIN_CONTINUE;
 
set_task(1.0,"give_stuff",id);
 
return PLUGIN_CONTINUE;
}
 
public admin_motd(id,level,cid) {
 
if (!cmd_access(id,level,cid,1))
return PLUGIN_CONTINUE
 
show_motd(id,"vip.txt","Deathrun Vip by Krzywy")
return PLUGIN_CONTINUE   
}
 
public give_stuff(id)
{
new CsTeams:userTeam = cs_get_user_team(id)
if(userTeam == CS_TEAM_CT)
if(!is_user_connected(id))
return;
 
  fm_give_item(id, "item_assaultsuit");
   fm_give_item(id, "weapon_flashbang");
   fm_give_item(id, "weapon_flashbang");
   fm_give_item(id, "weapon_hegrenade");
   fm_give_item(id, "weapon_smokegrenade");
   new deagle = fm_give_item(id, "weapon_deagle");
   cs_set_user_bpammo(id, CSW_DEAGLE, 0);
   cs_set_weapon_ammo(deagle, 1);
   set_user_gravity (id, 0.50);
   cs_set_user_money(id, cs_get_user_money(id) + 2000);
}
 
public handle_say(id)
{
new said[192]
read_args(said,192)
if(( containi(said, "who") != -1 && containi(said, "admin") != -1) || contain(said, "/vips") != -1)
set_task(0.1,"print_viplist", id)
return PLUGIN_CONTINUE
}
 
public print_viplist(user) 
{
new adminnames[33][32]
new message[256]
new contactinfo[256], contact[112]
new id, count, x, len
 
for(id = 1 ; id <= maxplayers ; id++)
if(is_user_connected(id))
if(get_user_flags(id) & ADMIN_CVAR)
get_user_name(id, adminnames[count++], 31)
 
len = format(message, 255, "%s Vip`y Online: ",COLOR)
if(count > 0) {
for(x = 0 ; x < count ; x++) {
len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"")
if(len > 96 ) {
print_message(user, message)
len = format(message, 255, "%s ",COLOR)
}
}
print_message(user, message)
}
else {
len += format(message[len], 255-len, "Niema Vip`ow Online")
print_message(user, message)
}
 
get_cvar_string("amx_contactinfo", contact, 63)
if(contact[0])  {
format(contactinfo, 111, "%s Przychodzi Admin -- %s", COLOR, contact)
print_message(user, contactinfo)
}
}
 
print_message(id, msg[])
{
message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
write_byte(id)
write_string(msg)
message_end()
}
 
public CmdStart(id, uc_handle)
{
static moze_skoczyc;
 
if(!is_user_alive(id) || !(get_user_flags(id)&ADMIN_CVAR))
return FMRES_IGNORED;
 
new button = get_uc(uc_handle, UC_Buttons);
new oldbutton = pev(id, pev_oldbuttons);
new flags = pev(id, pev_flags);
if((button & IN_JUMP) && !(flags & FL_ONGROUND) && !(oldbutton & IN_JUMP) && moze_skoczyc & (1<<id))
{
moze_skoczyc &=  ~(1<<id)  
new Float:velocity[3];
pev(id, pev_velocity, velocity);
velocity[2] = random_float(265.0,285.0);
set_pev(id, pev_velocity, velocity);
}
else if(flags & FL_ONGROUND){
moze_skoczyc |= (1<<id)
}
 
return FMRES_IGNORED;
}


#2 Hiroshima

    Godlike

  • Przyjaciel

Reputacja: 1 327
Godlike

  • Postów:4 984
  • Steam:steam
  • Imię:Michał
  • Lokalizacja:Málaga
Offline

Napisano 04.09.2011 13:57

Automatyczna wiadomość


Ten temat został przeniesiony z forum:
AMX Mod XProblemy z pluginami
do
Scripting AMXXProblemy


  • +
  • -
  • 0

#3 krzywy92

    Zaawansowany

  • Autor tematu
  • Zbanowany

Reputacja: 2
Nowy

  • Postów:85
  • Lokalizacja:gdansk
Offline

Napisano 07.09.2011 11:47

# refresh




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

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