Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sadece CT'ler için Boya Kalemi [Resimli]
#1
Sadece CT özel Paint
Kullanımı bind key +paint Örnek bind v +paint
Buda oyundan görüntüler
Not: Herhangi Bir Los, Kasma Durumları
Mahkumlardan biri kullanınca say'dan uyarı mesajı
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <xs>

#define PLUGIN "Only CT Magic Marker"
#define VERSION "3.1"
#define AUTHOR "stupok69"

#define MAX_PLAYERS 32

new Float:origin[MAX_PLAYERS+1][3]
new 
prethink_counter[MAX_PLAYERS+1]
new 
bool:is_drawing[MAX_PLAYERS+1]
new 
bool:is_holding[MAX_PLAYERS+1]

new 
spriteid

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("+paint""paint_handler")
    
register_clcmd("-paint""paint_handler")
    
register_forward(FM_PlayerPreThink"forward_FM_PlayerPreThink"0)
}

public 
plugin_precache()
{
    
spriteid precache_model("sprites/lgtning.spr")
}

public 
paint_handler(idlevelcid)
{
    if(!(
get_user_team(id) == 2))
        return 
PLUGIN_HANDLED
    
    
if(!is_user_alive(id))
    {
        
client_print(idprint_chat"Oluler Yazi Yazamaz!")
        return 
PLUGIN_HANDLED
    
}
    
    static 
cmd[2]
    
read_argv(0cmd1)
    
    switch(
cmd[0])
    {
        case 
'+'is_drawing[id] = true
        
case '-'is_drawing[id] = false
    
}
    return 
PLUGIN_HANDLED
}

public 
forward_FM_PlayerPreThink(id)
{
    if(
prethink_counter[id]++ > 5)
    {
        if(!
is_user_admin(id))
        return 
1;
        if(
is_drawing[id] && !is_aiming_at_sky(id))
        {
            static 
Float:cur_origin[3], Float:distance

            cur_origin 
origin[id]
            
            if(!
is_holding[id])
            {
                
fm_get_aim_origin(idorigin[id])
                
move_toward_client(idorigin[id])
                
is_holding[id] = true
                
return FMRES_IGNORED
            
}
            
            
fm_get_aim_origin(idorigin[id])
            
move_toward_client(idorigin[id])
            
            
distance get_distance_f(origin[id], cur_origin)
            
            if(
distance 2)
            {
                
draw_line(origin[id], cur_origin)
            }
        }
        else
        {
            
is_holding[id] = false
        
}
        
prethink_counter[id] = 0
    
}
    
    return 
FMRES_IGNORED
}

stock draw_line(Float:origin1[3], Float:origin2[3])
{
    
message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
    
write_byte(TE_BEAMPOINTS)
    
engfunc(EngFunc_WriteCoordorigin1[0])
    
engfunc(EngFunc_WriteCoordorigin1[1])
    
engfunc(EngFunc_WriteCoordorigin1[2])
    
engfunc(EngFunc_WriteCoordorigin2[0])
    
engfunc(EngFunc_WriteCoordorigin2[1])
    
engfunc(EngFunc_WriteCoordorigin2[2])
    
write_short(spriteid)
    
write_byte(0)
    
write_byte(10)
    
write_byte(255)
    
write_byte(50)
    
write_byte(0)
    
write_byte(random(255))
    
write_byte(random(255))
    
write_byte(random(255))
    
write_byte(255)
    
write_byte(0)
    
message_end()
}

//from fakemeta_util.inc
stock fm_get_aim_origin(indexFloat:origin[3])
{
    static 
Float:start[3], Float:view_ofs[3]
    
pev(indexpev_originstart)
    
pev(indexpev_view_ofsview_ofs)
    
xs_vec_add(startview_ofsstart)
    
    static 
Float:dest[3]
    
pev(indexpev_v_angledest)
    
engfunc(EngFunc_MakeVectorsdest)
    
global_get(glb_v_forwarddest)
    
xs_vec_mul_scalar(dest9999.0dest)
    
xs_vec_add(startdestdest)
    
    
engfunc(EngFunc_TraceLinestartdest0index0)
    
get_tr2(0TR_vecEndPosorigin)
    
    return 
1
}

stock move_toward_client(idFloat:origin[3])
{        
    static 
Float:player_origin[3]
    
    
pev(idpev_originplayer_origin)
    
    
origin[0] += (player_origin[0] > origin[0]) ? 1.0 : -1.0
    origin
[1] += (player_origin[1] > origin[1]) ? 1.0 : -1.0
    origin
[2] += (player_origin[2] > origin[2]) ? 1.0 : -1.0
}
//Thanks AdaskoMX!
bool:is_aiming_at_sky(index)
{
    new 
Float:origin[3];
    
fm_get_aim_origin(indexorigin);

    return 
engfunc(EngFunc_PointContentsorigin) == CONTENTS_SKY;

Gardiyanlardan herkes kullanabilir.
[Image: TQPX.jpg]
Reply


Messages In This Thread
Sadece CT'ler için Boya Kalemi [Resimli] - by Furkan Dize - 04-11-12, 13:38

Possibly Related Threads…
Thread Author Replies Views Last Post
  JailBreaK /menu Plugini Sma İçerde.[Resimli] fenerbahce07 86 33,969 04-06-18, 16:00
Last Post: ArapBey
  CT Silah Menüsü [Sadece AMXX] Nobb 5 10,046 07-12-16, 13:53
Last Post: Spydevil19
  Multi Jump Only CT [Sadece CT'dekiler yapar] Furkan Dize 5 4,159 11-05-16, 14:51
Last Post: likeb
  Jailbreak İçin Gerekli Tüm Pluginler Burada Umutcann67 7 11,424 21-02-16, 02:47
Last Post: Demirhannn
  Only Ct Speak ( Sadece CT'ler Microfon Basar ) NiCoMeDiA 163 24,630 02-04-15, 22:13
Last Post: jackdalton06

Foruma Atla:


Users browsing this thread: 1 Guest(s)