Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Basit bir istek.
#1
Aşağıda kodlarını verdiğim pluginin sadece de_dust mapında çalışmasını istiyorum şimdiden teşekkürler Smile

PHP Code:
#include <amxmodx>
#include <engine>
#include <hamsandwich>

#define MAX_PLAYERS 32

#define THROWING

#if !defined THROWING
#include <xs>
#endif

enum _:Room {
    
Room_G,
    
Room_M
};

new const 
gRoomNames[Room][] = {
    
"GU",
    
"M"
};

new const 
gRoomCvarNames[Room][] = {
    
"gu",
    
"ma"
};

enum _:Setting {
    
Setting_AbsMins,
    
Setting_AbsMaxs,
    
Setting_Throw_Origin,
    
Setting_Throw_Angles
};

new const 
Float:gRoomSettings[Room][Setting][3] = {
 
    {
        
// absmins
        
{ -713.0,  -990.0,  -157.0},
       

        { 
2375.0,   193.0, -2361.0},
      
    }
};

new 
Float:gEnterRoomTime[MAX_PLAYERS 1][Room];

new 
gCvarNoKill[Room];
new 
gCvarThrowTime[Room];
#if !defined THROWING_IS_TELEPORTING
new gCvarThrowSpeed[Room];
#endif

public plugin_init() {
    
register_plugin("No Killing Zones""0.0.5""Exolent");
    
    
RegisterHam(Ham_TakeDamage"player""FwdPlayerDamage");
    
RegisterHam(Ham_TraceAttack"player""FwdPlayerTraceAttack");
    
    new 
cvarName[64];
    for(new 
room 0room Roomroom++) {
        
formatex(cvarNamecharsmax(cvarName), "nkz_nokill_%s"gRoomCvarNames[room]);
        
gCvarNoKill[room] = register_cvar(cvarName"1");
        
        
formatex(cvarNamecharsmax(cvarName), "nkz_throw_%s_time"gRoomCvarNames[room]);
        
gCvarThrowTime[room] = register_cvar(cvarName"10");
        
#if !defined THROWING_IS_TELEPORTING
        
formatex(cvarNamecharsmax(cvarName), "nkz_throw_%s_speed"gRoomCvarNames[room]);
        
gCvarThrowSpeed[room] = register_cvar(cvarName"1000");
#endif
    
}
}

public 
FwdPlayerDamage(victiminflictorattackerFloat:damagedamageBits) {
    
// if player is hit by a grenade?
    
if(inflictor != attacker) {
        
// check if player is in a room
        
for(new room 0room Roomroom++) {
            
// if player has entered the room
            
if(gEnterRoomTime[victim][room] > 0.0) {
                
// block damage
                
return HAM_SUPERCEDE;
            }
        }
    }
    
    return 
HAM_IGNORED;
}

public 
FwdPlayerTraceAttack(victimattackerFloat:damageFloat:direction[3], tracedamageBits) {
    
// check if player or attacker are in a room
    
for(new room 0room Roomroom++) {
        
// if player or attacker have entered the room
        
if(gEnterRoomTime[victim][room] > 0.0 || gEnterRoomTime[attacker][room] > 0.0) {
            
// block damage
            
return HAM_SUPERCEDE;
        }
    }
    
    return 
HAM_IGNORED;
}

public 
client_PreThink(id) {
    static 
lastAlive[MAX_PLAYERS 1];
    static 
Float:lastMessage[MAX_PLAYERS 1];
    
    if(
is_user_alive(id)) {
        new 
Float:origin[3];
        
entity_get_vector(idEV_VEC_originorigin);
        
        new 
Float:gametime get_gametime();
        new 
Float:throwtime;
        new 
length[64];
#if !defined THROWING_IS_TELEPORTING
        
new Float:velocity[3];
#endif
        
        
for(new room 0room Roomroom++) {
            if((
gRoomSettings[room][Setting_AbsMins][0] <= origin[0] <= gRoomSettings[room][Setting_AbsMaxs][0])
            && (
gRoomSettings[room][Setting_AbsMins][1] <= origin[1] <= gRoomSettings[room][Setting_AbsMaxs][1])
             && (
gRoomSettings[room][Setting_AbsMins][2] <= origin[2]  <= gRoomSettings[room][Setting_AbsMaxs][2])) {
                if(
gEnterRoomTime[id][room] == 0.0) {
                    
gEnterRoomTime[id][room] = gametime;
                }
                
                
throwtime get_pcvar_float(gCvarThrowTime[room]);
                
                if(
throwtime 0.0) {
                    
// if they are not being thrown yet
                    
if((gEnterRoomTime[id][room] + throwtime) >= gametime) {
                        
// if they can be told they are here
                        
if((lastMessage[id] + 0.2) < gametime) {
                            
// get how long they have before they will be thrown
                            
get_time_length(gEnterRoomTime[id][room] + throwtime gametimelengthcharsmax(length));
                            
                            
// tell player they are in the room
                            
set_hudmessage(25500, .holdtime 0.3, .fadeintime 0.0, .fadeouttime 0.0, .channel 2);
                             
show_hudmessage(id"Bulundugun Bolge %s, .Burada Beklemek YASAKTIR.  Otomatik Isinlanmaya son %s"gRoomNames[room], length);
                            
                            
// save when last message was sent
                            
lastMessage[id] = gametime;
                        }
                    } else {
#if !defined THROWING_IS_TELEPORTING
                        // grab player's current velocity
                        
entity_get_vector(idEV_VEC_velocityvelocity);
                        
                        
// store Z velocity
                        
throwtime velocity[2];
                        
                        
// calculate direction of player's position to throw position
                        
xs_vec_sub(gRoomSettings[room][Setting_Throw_Origin], originvelocity);
                        
                        
// remove any Z offsets
                        
velocity[2] = 0.0;
                        
                        
// set the speed of the velocity
                        
xs_vec_mul_scalar(velocityget_pcvar_float(gCvarThrowSpeed[room]) / vector_length(velocity), velocity);
                        
                        
// restore the Z velocity
                        
velocity[2] = throwtime;
                        
                        
// set player's velocity towards the throw position
                        
entity_set_vector(idEV_VEC_velocityvelocity);
#else
                        // set player's origin to teleport out
                        
entity_set_origin(idgRoomSettings[room][Setting_Throw_Origin]);
#endif
                        
                        // set player's angles while being thrown?
                        
entity_set_vector(idEV_VEC_anglesgRoomSettings[room][Setting_Throw_Angles]);
                        
entity_set_int(idEV_INT_fixangle1);
                    }
                }
            } else {
                
gEnterRoomTime[id][room] = 0.0;
            }
        }
        
        
lastAlive[id] = 1;
    } else if(
lastAlive[id]) {
        
arrayset(_:gEnterRoomTime[id], _:0.0Room);
        
        
lastAlive[id] = 0;
    }
}

get_time_length(Float:Saniyesoutput[], output_len) {
    new 
_Saniyes floatround(Saniyesfloatround_ceil);
    
    new const 
unit_mults[] = {
        
60,
        
1
    
};
    new const 
unit_names[sizeof(unit_mults)][2][] = {
        {
"Dakika""Dakikas"},
        {
"Saniye""Saniyes"}
    };
    
    new 
unit_values[sizeof(unit_mults)][2];
    new 
num_units;
    
    for(new 
0valsizeof(unit_mults); i++) {
        
val _Saniyes unit_mults[i];
        
        if(
val) {
            
unit_values[num_units][0] = val;
            
unit_values[num_units][1] = i;
            
num_units++;
            
            
_Saniyes %= unit_mults;
        }
    }
    
    new 
len output[0] = 0;
    
    for(new 
0num_unitsi++) {
        
len += formatex(output[len], output_len len"%s%s%d %s",
            (
&& num_units 2) ? ", " "",
            ((
== (num_units 1) && num_units 1) ? (num_units "and " " and ") : ""),
            
unit_values[0],
            
unit_names[unit_values[1]][unit_values[0] != 1]
            );
    }
    
    return 
len;

[/i][/i][/i][/i][/i]
Reply
#2
de_ mi yoksa de_dust tamı yoksa d2 demi ?
Reply
#3
de_dust
Reply
#4
Bunu ekle
PHP Code:
public plugin_cfg() {
    new 
mapname[32];
    
get_mapname(mapname,31)
    if(!
equali(mapname,"de_dust")) set_fail_state("Plugin Yalnizca ^"de_dust2^" Mapinde Calisir")



CS:GO ve CS 1.6 için ücretli eklenti yapılır.
Plugin yazmak isteyenlere yardımcı olabilirim.
Skype adresimden ulaşabilirsiniz:
destek_596
Steam: http://steamcommunity.com/id/ca-nemesis/

Reply
#5
pluginde
PHP Code:
#include <xs> 
eksik
Reply
#6
Konu açarken başlıkta isteğin hakkında bilgi vermelisin.
Basit bir istek, içeri girin vs. gibi olmaz.
[center]
La'brigade # Gaming Bir Gün Değil Her Gün Kral !
Cs 1.6 Server : CS.LabrigadeGaming.Com
TeamSpeak3 Server : Ts3.LabrigadeGaming.Com
Msn : [email protected]
Facebook : http://www.facebook.com/LabrigadeClan
Skype : HijyeniK

[Image: ftt17.png]
[/center]
Reply
#7
akcaliberkk dateline='' Wrote: Bunu ekle
PHP Code:
public plugin_cfg() {
    new 
mapname[32];
    
get_mapname(mapname,31)
    if(!
equali(mapname,"de_dust")) set_fail_state("Plugin Yalnizca ^"de_dust2^" Mapinde Calisir")


Teşekkürler Berk
Reply
#8
Çözülmüş İsteklere taşındı.


CS:GO ve CS 1.6 için ücretli eklenti yapılır.
Plugin yazmak isteyenlere yardımcı olabilirim.
Skype adresimden ulaşabilirsiniz:
destek_596
Steam: http://steamcommunity.com/id/ca-nemesis/

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [İSTEK]Jb Verme Plugini (/mg) NorDan 8 12,924 03-09-17, 18:06
Last Post: tahayasin
  [ İSTEK ] Belirli Yetki Hariç 3 Raund Weapon Engel excellenT 15 6,352 21-07-17, 03:49
Last Post: SINCAPP
  [İSTEK] CT MAVi - T Kırmızı ışık yanan Plugin + Video Çektim ademcan36 9 10,465 26-04-17, 16:15
Last Post: h4m4s
  [ISTEK] Hızlı Dowload Link [ISTEK] TagaL 13 7,768 05-01-17, 01:30
Last Post: marvel1905
  Menu ve jbmenu istek hamhum 10 12,376 05-01-17, 01:30
Last Post: marvel1905
  İSTEK ! Sadece Ct de hook basabilmek playman01 17 7,537 28-08-16, 14:42
Last Post: QuarsS
  Acil Sorun istek hasanx9 6 3,993 03-08-16, 20:44
Last Post: murat1366
  Plugin İstek CFG Tarzı erenstrkl 6 3,775 03-08-16, 20:31
Last Post: murat1366
  Reklamcılara karsi Acil İstek[Plugin] hasan0650 22 5,577 17-07-16, 18:03
Last Post: BYHAZARD7
  [pawn] istek batuopoz0770 4 6,547 19-04-15, 16:27
Last Post: akcaliberkk

Foruma Atla:


Users browsing this thread: 1 Guest(s)