T de hook basma istek.
Moderatör: Moderatörler
-
Ali
Konu Sahibi - Mesajlar: 421
- Kayıt: Çrş Eyl 09, 2015 11:08 pm
T de hook basma istek.
T de hook basılabılsın.Fakat hücre kapısı e tusuna basarak , silahla sıkınca vs. açıldıgında t deki hook iptal olsun.Yapılabilir mi ?
| Link: | |
| Linklerini gizle |
-
Ali
Konu Sahibi - Mesajlar: 421
- Kayıt: Çrş Eyl 09, 2015 11:08 pm
-
Necati Doğan
- Mesajlar: 822
- Kayıt: Prş Haz 07, 2018 6:18 pm
- Konum: İstanbul
- Clan İsmi: Ke$`h Gaming
- İletişim:
T de hook basma istek.
Dener misin? Hücre içinde çalışması lazım.(Satın alma bölgesi) CT ler için kullandığın hook felan varsa onun içine entegre edersek daha iyi olur.
Kod: Tümünü seç
#include <amxmodx>
#include <reapi>
#include <cstrike>
new hook_speed,bool:hook[33],hook_to[33][3],beamsprite;
public plugin_init() {
register_plugin("Hook Grab Rope", "1.0", "PurposeLess");
register_clcmd("+hook", "hook_on");
register_clcmd("-hook", "hook_off");
hook_speed = register_cvar("hook_speed", "5");
}
public plugin_precache(){ beamsprite=precache_model("sprites/dot.spr"); precache_sound("weapons/xbow_hit2.wav"); }
public hook_on(id) {
if(!is_continue(id) || hook[id]) return PLUGIN_HANDLED;
set_entvar(id, var_gravity, 0.0);
set_task(0.1, "hook_prethink", id+10000, "", 0, "b");
hook[id] = true;
hook_to[id][0] = 999999;
hook_prethink(id+10000);
rh_emit_sound2(id, 0, CHAN_AUTO, "weapons/xbow_hit2.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM);
return PLUGIN_HANDLED;
}
public hook_off(id) {
if(!hook[id]) return PLUGIN_HANDLED;
if(is_user_alive(id)) set_entvar(id, var_gravity, 1.0);
hook[id] = false;
return PLUGIN_HANDLED;
}
public hook_prethink(id) {
id -= 10000;
if(!is_continue(id)) hook[id] = false;
if(!hook[id]) { remove_task(id+10000); return PLUGIN_HANDLED; }
static origin1[3]; get_user_origin(id, origin1);
if(hook_to[id][0] == 999999) {
static origin2[3]; get_user_origin(id, origin2, 3);
hook_to[id][0]= origin2[0];
hook_to[id][1]= origin2[1];
hook_to[id][2]= origin2[2];
}
message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
write_byte(1);
write_short(id);
write_coord(hook_to[id][0]);
write_coord(hook_to[id][1]);
write_coord(hook_to[id][2]);
write_short(beamsprite);
write_byte(1);
write_byte(1);
write_byte(2);
write_byte(5);
write_byte(0);
write_byte(0);
write_byte(0);
write_byte(255);
write_byte(200);
write_byte(0);
message_end();
static Float:velocity[3];
velocity[0] = (float(hook_to[id][0]) - float(origin1[0])) * 3.0;
velocity[1] = (float(hook_to[id][1]) - float(origin1[1])) * 3.0;
velocity[2] = (float(hook_to[id][2]) - float(origin1[2])) * 3.0;
static Float:y;
y = velocity[0]*velocity[0] + velocity[1]*velocity[1] + velocity[2]*velocity[2];
static Float:x;
x = (get_pcvar_float(hook_speed) * 120.0) / floatsqroot(y);
velocity[0] *= x;
velocity[1] *= x;
velocity[2] *= x;
set_entvar(id, var_velocity, velocity);
return PLUGIN_CONTINUE;
}
bool:is_continue(id) {
if(get_member(id, m_iTeam) != 1 || !is_user_alive(id) || !cs_get_user_buyzone(id)) return false;
return true;
}| Link: | |
| Linklerini gizle |
-
Ali
Konu Sahibi - Mesajlar: 421
- Kayıt: Çrş Eyl 09, 2015 11:08 pm
T de hook basma istek.
Necati Doğan yazdı: Pzt Nis 01, 2019 8:59 pm Dener misin? Hücre içinde çalışması lazım.(Satın alma bölgesi) CT ler için kullandığın hook felan varsa onun içine entegre edersek daha iyi olur.Kod: Tümünü seç
#include <amxmodx> #include <reapi> #include <cstrike> new hook_speed,bool:hook[33],hook_to[33][3],beamsprite; public plugin_init() { register_plugin("Hook Grab Rope", "1.0", "PurposeLess"); register_clcmd("+hook", "hook_on"); register_clcmd("-hook", "hook_off"); hook_speed = register_cvar("hook_speed", "5"); } public plugin_precache(){ beamsprite=precache_model("sprites/dot.spr"); precache_sound("weapons/xbow_hit2.wav"); } public hook_on(id) { if(!is_continue(id) || hook[id]) return PLUGIN_HANDLED; set_entvar(id, var_gravity, 0.0); set_task(0.1, "hook_prethink", id+10000, "", 0, "b"); hook[id] = true; hook_to[id][0] = 999999; hook_prethink(id+10000); rh_emit_sound2(id, 0, CHAN_AUTO, "weapons/xbow_hit2.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM); return PLUGIN_HANDLED; } public hook_off(id) { if(!hook[id]) return PLUGIN_HANDLED; if(is_user_alive(id)) set_entvar(id, var_gravity, 1.0); hook[id] = false; return PLUGIN_HANDLED; } public hook_prethink(id) { id -= 10000; if(!is_continue(id)) hook[id] = false; if(!hook[id]) { remove_task(id+10000); return PLUGIN_HANDLED; } static origin1[3]; get_user_origin(id, origin1); if(hook_to[id][0] == 999999) { static origin2[3]; get_user_origin(id, origin2, 3); hook_to[id][0]= origin2[0]; hook_to[id][1]= origin2[1]; hook_to[id][2]= origin2[2]; } message_begin(MSG_BROADCAST, SVC_TEMPENTITY); write_byte(1); write_short(id); write_coord(hook_to[id][0]); write_coord(hook_to[id][1]); write_coord(hook_to[id][2]); write_short(beamsprite); write_byte(1); write_byte(1); write_byte(2); write_byte(5); write_byte(0); write_byte(0); write_byte(0); write_byte(255); write_byte(200); write_byte(0); message_end(); static Float:velocity[3]; velocity[0] = (float(hook_to[id][0]) - float(origin1[0])) * 3.0; velocity[1] = (float(hook_to[id][1]) - float(origin1[1])) * 3.0; velocity[2] = (float(hook_to[id][2]) - float(origin1[2])) * 3.0; static Float:y; y = velocity[0]*velocity[0] + velocity[1]*velocity[1] + velocity[2]*velocity[2]; static Float:x; x = (get_pcvar_float(hook_speed) * 120.0) / floatsqroot(y); velocity[0] *= x; velocity[1] *= x; velocity[2] *= x; set_entvar(id, var_velocity, velocity); return PLUGIN_CONTINUE; } bool:is_continue(id) { if(get_member(id, m_iTeam) != 1 || !is_user_alive(id) || !cs_get_user_buyzone(id)) return false; return true; }
kullandıgım cthook bu
Bu mesaja eklenen dosyaları görüntülemek için gerekli izinlere sahip değilsiniz.
| Link: | |
| Linklerini gizle |
-
alikiko213
- Mesajlar: 1
- Kayıt: Sal Nis 02, 2019 12:28 am
T de hook basma istek.
Yapılması kötü olur ama eğlenceli olabilr. T ler beklemekten sıkılmazlar
| Link: | |
| Linklerini gizle |
-
Ali
Konu Sahibi - Mesajlar: 421
- Kayıt: Çrş Eyl 09, 2015 11:08 pm
T de hook basma istek.
olmuyor mu ?Necati Doğan yazdı: Pzt Nis 01, 2019 8:59 pm Dener misin? Hücre içinde çalışması lazım.(Satın alma bölgesi) CT ler için kullandığın hook felan varsa onun içine entegre edersek daha iyi olur.Kod: Tümünü seç
#include <amxmodx> #include <reapi> #include <cstrike> new hook_speed,bool:hook[33],hook_to[33][3],beamsprite; public plugin_init() { register_plugin("Hook Grab Rope", "1.0", "PurposeLess"); register_clcmd("+hook", "hook_on"); register_clcmd("-hook", "hook_off"); hook_speed = register_cvar("hook_speed", "5"); } public plugin_precache(){ beamsprite=precache_model("sprites/dot.spr"); precache_sound("weapons/xbow_hit2.wav"); } public hook_on(id) { if(!is_continue(id) || hook[id]) return PLUGIN_HANDLED; set_entvar(id, var_gravity, 0.0); set_task(0.1, "hook_prethink", id+10000, "", 0, "b"); hook[id] = true; hook_to[id][0] = 999999; hook_prethink(id+10000); rh_emit_sound2(id, 0, CHAN_AUTO, "weapons/xbow_hit2.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM); return PLUGIN_HANDLED; } public hook_off(id) { if(!hook[id]) return PLUGIN_HANDLED; if(is_user_alive(id)) set_entvar(id, var_gravity, 1.0); hook[id] = false; return PLUGIN_HANDLED; } public hook_prethink(id) { id -= 10000; if(!is_continue(id)) hook[id] = false; if(!hook[id]) { remove_task(id+10000); return PLUGIN_HANDLED; } static origin1[3]; get_user_origin(id, origin1); if(hook_to[id][0] == 999999) { static origin2[3]; get_user_origin(id, origin2, 3); hook_to[id][0]= origin2[0]; hook_to[id][1]= origin2[1]; hook_to[id][2]= origin2[2]; } message_begin(MSG_BROADCAST, SVC_TEMPENTITY); write_byte(1); write_short(id); write_coord(hook_to[id][0]); write_coord(hook_to[id][1]); write_coord(hook_to[id][2]); write_short(beamsprite); write_byte(1); write_byte(1); write_byte(2); write_byte(5); write_byte(0); write_byte(0); write_byte(0); write_byte(255); write_byte(200); write_byte(0); message_end(); static Float:velocity[3]; velocity[0] = (float(hook_to[id][0]) - float(origin1[0])) * 3.0; velocity[1] = (float(hook_to[id][1]) - float(origin1[1])) * 3.0; velocity[2] = (float(hook_to[id][2]) - float(origin1[2])) * 3.0; static Float:y; y = velocity[0]*velocity[0] + velocity[1]*velocity[1] + velocity[2]*velocity[2]; static Float:x; x = (get_pcvar_float(hook_speed) * 120.0) / floatsqroot(y); velocity[0] *= x; velocity[1] *= x; velocity[2] *= x; set_entvar(id, var_velocity, velocity); return PLUGIN_CONTINUE; } bool:is_continue(id) { if(get_member(id, m_iTeam) != 1 || !is_user_alive(id) || !cs_get_user_buyzone(id)) return false; return true; }
| Link: | |
| Linklerini gizle |