-Incepi runda cu 100 AP (Armura).
-Primesti +100 HP la Zombie si +50 HP la Human.
-Ai sansa de 1 Respawn pe runda.
-Pentru a deveni human, scrii in chat: /cure
-In chat: /ethereal pentru arma speciala. un ak47 gold , dar sa fie un dmg destul de mic pentru ca viata la zm este de 450 la primu zm infectat , normal e 250
-In consola: bind x +paint pentru a picta pe pereti.
-Ai tagul VIP in chat si tabela cu scoruri.
-Slot rezervat & Skin vip si skin lama .
cand omori un zm ca ct primesti 300$ si ca vip 500$
si cand infectezi un zm e 1000 si ca vip sa primesti 1500$
am un vip amxx , care a fost la vechiu sv dar nu am sms sa pot modica
l am decompilat amxx , si a iesit ceva dar nu stiu daca e 100%
- sursa | Afiseaza codul
new spriteid; new xs__ITaskId; new xs__ITaskParam[1033] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 132, 140, 148, 156, 164, 172, 180, 188, 196, 204, 212, 220, 228, 236, 244, 252, 260, 268, 276, 284, 292, 300, 308, 316, 324, 332, 340, 348, 356, 364, 372, 380, 388, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 80, 32, 83, 121, 115, 116, 101, 109, 32, 90, 77, 0, 49, 46, 48, 0, 75, 101, 110, 115, 104, 105, 110, 0, 115, 97, 121, 32, 47, 118, 105, 112, 115, 0, 112, 114, 105, 110, 116, 95, 118, 105, 112, 108, 105, 115, 116, 0, 0, 115, 97, 121, 32, 47, 105, 110, 102, 111, 118, 105, 112, 0, 118, 105, 112, 95, 105, 110, 102, 111, 0, 115, 97, 121, 32, 47, 118, 105, 112, 0, 118, 105, 112, 95, 105, 110, 102, 111, 0, 115, 97, 121, 32, 47, 118, 105, 112, 105, 110, 102, 111, 0, 118, 105, 112, 95, 105, 110, 102, 111, 0, 115, 97, 121, 32, 47, 99, 117, 114, 101, 0, 99, 117, 114, 101, 95, 118, 105, 112, 0, 43, 112, 97, 105, 110, 116, 0, 112, 97, 105, 110, 116, 95, 104, 97, 110, 100, 108, 101, 114, 0, 45, 112, 97, 105, 110, 116, 0, 112, 97, 105, 110, 116, 95, 104, 97, 110, 100, 108, 101, 114, 0, 68, 101, 97, 116, 104, 77, 115, 103, 0, 101, 68, 101, 97, 116, 104, 77, 115, 103, 0, 97, 0, 0, 118, 95, 114, 111, 117, 110, 100, 95, 101, 110, 100, 0, 49, 61, 82, 111, 117, 110, 100, 95, 69, 110, 100, 0, 72, 76, 84, 86, 0, 101, 78, 101, 119, 82, 111, 117, 110, 100, 0, 97, 0, 49, 61, 48, 0, 50, 61, 48, 0, 83, 97, 121, 84, 101, 120, 116, 0, 104, 97, 110, 100, 108, 101, 83, 97, 121, 84, 101, 120, 116, 0, 83, 99, 111, 114, 101, 65, 116, 116, 114, 105, 98, 0, 109, 115, 103, 83, 99, 111, 114, 101, 65, 116, 116, 114, 105, 98, 0, 112, 108, 97, 121, 101, 114, 0, 104, 97, 109, 83, 112, 97, 119, 110, 0, 102, 111, 114, 119, 97, 114, 100, 95, 70, 77, 95, 80, 108, 97, 121, 101, 114, 80, 114, 101, 84, 104, 105, 110, 107, 0, 115, 112, 114, 105, 116, 101, 115, 47, 108, 103, 116, 110, 105, 110, 103, 46, 115, 112, 114, 0, 3, 91, 77, 78, 88, 93, 32, 1, 67, 111, 109, 97, 110, 100, 97, 32, 100, 105, 115, 112, 111, 110, 105, 98, 105, 108, 97, 32, 100, 111, 97, 114, 32, 112, 101, 110, 116, 114, 117, 32, 4, 86, 73, 80, 1, 46, 0, 3, 91, 77, 78, 88, 93, 32, 1, 80, 111, 116, 105, 32, 102, 111, 108, 111, 115, 105, 32, 99, 111, 109, 97, 110, 100, 97, 32, 4, 47, 99, 117, 114, 101, 32, 1, 100, 111, 97, 114, 32, 111, 32, 100, 97, 116, 97, 32, 112, 101, 32, 114, 117, 110, 100, 97, 46, 0, 97, 101, 0, 84, 69, 82, 82, 79, 82, 73, 83, 84, 0, 3, 91, 77, 78, 88, 93, 32, 1, 80, 111, 116, 105, 32, 102, 111, 108, 111, 115, 105, 32, 99, 111, 109, 97, 110, 100, 97, 32, 4, 47, 99, 117, 114, 101, 32, 1, 100, 111, 97, 114, 32, 100, 97, 99, 97, 32, 115, 117, 110, 116, 32, 109, 97, 105, 32, 109, 117, 108, 116, 105, 32, 100, 101, 32, 3, 68, 111, 105, 32, 90, 111, 109, 98, 105, 101, 32, 1, 86, 105, 105, 46, 0, 3, 91, 77, 78, 88, 93, 32, 1, 73, 110, 102, 101, 99, 116, 105, 97, 32, 97, 32, 102, 111, 115, 116, 32, 100, 105, 115, 116, 114, 117, 115, 97, 46, 32, 65, 105, 32, 100, 101, 118, 101, 110, 105, 116, 32, 4, 79, 77, 46, 0, 4, 91, 86, 73, 80, 93, 0, 35, 67, 115, 116, 114, 105, 107, 101, 95, 67, 104, 97, 116, 95, 65, 108, 108, 0, 32, 0, 3, 32, 37, 115, 49, 1, 32, 58, 32, 32, 37, 115, 50, 0, 47, 97, 100, 100, 111, 110, 115, 47, 97, 109, 120, 109, 111, 100, 120, 47, 99, 111, 110, 102, 105, 103, 115, 47, 118, 105, 112, 95, 105, 110, 102, 111, 46, 104, 116, 109, 108, 0, 0, 114, 119, 95, 118, 105, 112, 0, 0, 0, 3, 91, 86, 73, 80, 93, 32, 1, 86, 101, 105, 32, 112, 114, 105, 109, 105, 32, 4, 82, 101, 115, 112, 97, 119, 110, 32, 1, 105, 110, 32, 53, 32, 115, 101, 99, 117, 110, 100 }; new xs__TaskFlags[5]; new xs__TaskFunc[48]; new xs__TaskId; new Float:xs__TaskInterval; new xs__TaskParam[1033] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 132, 140, 148, 156, 164, 172, 180, 188, 196, 204, 212, 220, 228, 236, 244, 252, 260, 268, 276, 284, 292, 300, 308, 316, 324, 332, 340, 348, 356, 364, 372, 380, 388, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 80, 32, 83, 121, 115, 116, 101, 109, 32, 90, 77, 0, 49, 46, 48, 0, 75, 101, 110, 115, 104, 105, 110, 0, 115, 97, 121, 32, 47, 118, 105, 112, 115, 0, 112, 114, 105, 110, 116, 95, 118, 105, 112, 108, 105, 115, 116, 0, 0, 115, 97, 121, 32, 47, 105, 110, 102, 111, 118, 105, 112, 0, 118, 105, 112, 95, 105, 110, 102, 111, 0, 115, 97, 121, 32, 47, 118, 105, 112, 0, 118, 105, 112, 95, 105, 110, 102, 111, 0, 115, 97, 121, 32, 47, 118, 105, 112, 105, 110, 102, 111, 0, 118, 105, 112, 95, 105, 110, 102, 111, 0, 115, 97, 121, 32, 47, 99, 117, 114, 101, 0, 99, 117, 114, 101, 95, 118, 105, 112, 0, 43, 112, 97, 105, 110, 116, 0, 112, 97, 105, 110, 116, 95, 104, 97, 110, 100, 108, 101, 114, 0, 45, 112, 97, 105, 110, 116, 0, 112, 97, 105, 110, 116, 95, 104, 97, 110, 100, 108, 101, 114, 0, 68, 101, 97, 116, 104, 77, 115, 103, 0, 101, 68, 101, 97, 116, 104, 77, 115, 103, 0, 97, 0, 0, 118, 95, 114, 111, 117, 110, 100, 95, 101, 110, 100, 0, 49, 61, 82, 111, 117, 110, 100, 95, 69, 110, 100, 0, 72, 76, 84, 86, 0, 101, 78, 101, 119, 82, 111, 117, 110, 100, 0, 97, 0, 49, 61, 48, 0, 50, 61, 48, 0, 83, 97, 121, 84, 101, 120, 116, 0, 104, 97, 110, 100, 108, 101, 83, 97, 121, 84, 101, 120, 116, 0, 83, 99, 111, 114, 101, 65, 116, 116, 114, 105, 98, 0, 109, 115, 103, 83, 99, 111, 114, 101, 65, 116, 116, 114, 105, 98, 0, 112, 108, 97, 121, 101, 114, 0, 104, 97, 109, 83, 112, 97, 119, 110, 0, 102, 111, 114, 119, 97, 114, 100, 95, 70, 77, 95, 80, 108, 97, 121, 101, 114, 80, 114, 101, 84, 104, 105, 110, 107, 0, 115, 112, 114, 105, 116, 101, 115, 47, 108, 103, 116, 110, 105, 110, 103, 46, 115, 112, 114, 0, 3, 91, 77, 78, 88, 93, 32, 1, 67, 111, 109, 97, 110, 100, 97, 32, 100, 105, 115, 112, 111, 110, 105, 98, 105, 108, 97, 32, 100, 111, 97, 114, 32, 112, 101, 110, 116, 114, 117, 32, 4, 86, 73, 80, 1, 46, 0, 3, 91, 77, 78, 88, 93, 32, 1, 80, 111, 116, 105, 32, 102, 111, 108, 111, 115, 105, 32, 99, 111, 109, 97, 110, 100, 97, 32, 4, 47, 99, 117, 114, 101, 32, 1, 100, 111, 97, 114, 32, 111, 32, 100, 97, 116, 97, 32, 112, 101, 32, 114, 117, 110, 100, 97, 46, 0, 97, 101, 0, 84, 69, 82, 82, 79, 82, 73, 83, 84, 0, 3, 91, 77, 78, 88, 93, 32, 1, 80, 111, 116, 105, 32, 102, 111, 108, 111, 115, 105, 32, 99, 111, 109, 97, 110, 100, 97, 32, 4, 47, 99, 117, 114, 101, 32, 1, 100, 111, 97, 114, 32, 100, 97, 99, 97, 32, 115, 117, 110, 116, 32, 109, 97, 105, 32, 109, 117, 108, 116, 105, 32, 100, 101, 32, 3, 68, 111, 105, 32, 90, 111, 109, 98, 105, 101, 32, 1, 86, 105, 105, 46, 0, 3, 91, 77, 78, 88, 93, 32, 1, 73, 110, 102, 101, 99, 116, 105, 97, 32, 97, 32, 102, 111, 115, 116, 32, 100, 105, 115, 116, 114, 117, 115, 97, 46, 32, 65, 105, 32, 100, 101, 118, 101, 110, 105, 116, 32, 4, 79, 77, 46, 0, 4, 91, 86, 73, 80, 93, 0, 35, 67, 115, 116, 114, 105, 107, 101, 95, 67, 104, 97, 116, 95, 65, 108, 108, 0, 32, 0, 3, 32, 37, 115, 49, 1, 32, 58, 32, 32, 37, 115, 50, 0, 47, 97, 100, 100, 111, 110, 115, 47, 97, 109, 120, 109, 111, 100, 120, 47, 99, 111, 110, 102, 105, 103, 115, 47, 118, 105, 112, 95, 105, 110, 102, 111, 46, 104, 116, 109, 108, 0, 0, 114, 119, 95, 118, 105, 112, 0, 0, 0, 3, 91, 86, 73, 80, 93, 32, 1, 86, 101, 105, 32, 112, 114, 105, 109, 105, 32, 4, 82, 101, 115, 112, 97, 119, 110, 32, 1, 105, 110, 32, 53, 32, 115, 101, 99, 117, 110, 100 }; new xs__TaskRepeat; new xs__global_null; new xs__internalseed; new xs__logtypenames[6][0] = { { 0, ... }, { 0, ... }, { 0, ... }, { 0, ... }, { 0, ... }, { 0, ... } }; new xs__maxnum; new String:xs__replace_buf[12288]; new bool:has_rw[33]; new bool:has_cure[33]; new Float:origin[33][3]; new prethink_counter[33]; new bool:is_drawing[33]; new bool:is_holding[33]; new bool:is_end; bool:operator>(Float:,Float:)(Float:oper1, Float:oper2) { return 0 < floatcmp(oper1, oper2); } bool:operator>(Float:,_:)(Float:oper1, oper2) { return 0 < floatcmp(oper1, float(oper2)); } public __fatal_ham_error(Ham:id, HamError:err, reason[]) { new func = get_func_id("HamFilter", -1); new bool:fail = 1; new var1; if (func != -1 && callfunc_begin_i(func, -1) == 1) { callfunc_push_int(id); callfunc_push_int(err); callfunc_push_str(reason, "HamFilter"); if (callfunc_end() == 1) { fail = false; } } if (fail) { set_fail_state(reason); } return 0; } xs_vec_add(Float:in1[], Float:in2[], Float:out[]) { out[0] = floatadd(in1[0], in2[0]); out[1] = floatadd(in1[1], in2[1]); out[2] = floatadd(in1[2], in2[2]); return 0; } xs_vec_mul_scalar(Float:vec[], Float:scalar, Float:out[]) { out[0] = floatmul(vec[0], scalar); out[1] = floatmul(vec[1], scalar); out[2] = floatmul(vec[2], scalar); return 0; } public plugin_init() { register_plugin("VIP System ZM", "1.0", "Kenshin"); register_clcmd("say /vips", "print_viplist", -1, 1436, -1); register_clcmd("say /infovip", "vip_info", -1, 1436, -1); register_clcmd("say /vip", "vip_info", -1, 1436, -1); register_clcmd("say /vipinfo", "vip_info", -1, 1436, -1); register_clcmd("say /cure", "cure_vip", -1, 1436, -1); register_clcmd("+paint", "paint_handler", -1, 1436, -1); register_clcmd("-paint", "paint_handler", -1, 1436, -1); register_event("DeathMsg", "eDeathMsg", 2008, 2016); register_logevent("v_round_end", 2, "1=Round_End"); register_event("HLTV", "eNewRound", 2176, "1=0", "2=0"); register_message(get_user_msgid("SayText"), "handleSayText"); register_message(get_user_msgid("ScoreAttrib"), "msgScoreAttrib"); RegisterHam("HamFilter", "player", "hamSpawn", 1); register_forward(104, "forward_FM_PlayerPreThink", "HamFilter"); return 0; } public plugin_precache() { spriteid = precache_model("sprites/lgtning.spr"); return 0; } public cure_vip(id) { if (!isvip(id)) { print_message(id, "\x03[MNX] \x01Comanda disponibila doar pentru \x04VIP\x01."); return 1; } new var1; if (is_user_alive(id) && is_user_zombie(id)) { if (has_cure[id]) { print_message(id, "\x03[MNX] \x01Poti folosi comanda \x04/cure \x01doar o data pe runda."); return 0; } new players[32]; new pnum; get_players(players, pnum, "ae", "TERRORIST"); if (pnum < 3) { print_message(id, "\x03[MNX] \x01Poti folosi comanda \x04/cure \x01doar daca sunt mai multi de \x03Doi Zombie \x01Vii."); return 1; } cure_user(id); has_cure[id] = 1; reset_user_ethereal(id); print_message(id, "\x03[MNX] \x01Infectia a fost distrusa. Ai devenit \x04OM."); } return 0; } public hamSpawn(id) { is_drawing[id] = 0; has_cure[id] = 0; return 0; } public eNewRound() { arrayset(has_rw, "HamFilter", 33); is_end = false; return 0; } public v_round_end() { is_end = true; return 0; } public handleSayText(msgId, msgDest, msgEnt) { new id = get_msg_arg_int(1); new var1; if (is_user_connected(id) && isvip(id)) { new szTmp[256]; new szTmp2[256]; get_msg_arg_string(2, szTmp, 255); new szPrefix[64] = {4,91,86,73,80,93,0}; if (!equal(szTmp, "#Cstrike_Chat_All", "HamFilter")) { add(szTmp2, 255, szPrefix, "HamFilter"); add(szTmp2, 255, 3760, "HamFilter"); add(szTmp2, 255, szTmp, "HamFilter"); } else { add(szTmp2, 255, szPrefix, "HamFilter"); add(szTmp2, 255, "\x03 %s1\x01 : %s2", "HamFilter"); } set_msg_arg_string(2, szTmp2); } return 0; } public vip_info(id) { show_motd(id, "/addons/amxmodx/configs/vip_info.html", 3976); return 0; } public msgScoreAttrib(MsgId, MsgType, MsgDest) { new var1; if (get_msg_arg_int(2) || !isvip(get_msg_arg_int(1))) { return 0; } set_msg_arg_int(2, 1, 4); return 0; } public eDeathMsg() { new Victim = read_data(2); new var1; if (isvip(Victim) && !has_rw[Victim]) { set_task(1084227584, "rw_vip", Victim, 4008, "HamFilter", 4012, "HamFilter"); print_message(Victim, "\x03[VIP] \x01Vei primi \x04Respawn \x01in 5 secunde."); } return 0; } public rw_vip(id) { new var1; if (!is_user_connected(id) || is_user_alive(id) || cs_get_user_team(id, 0) == 3 || is_end) { return 0; } has_rw[id] = 1; set_pev(id, 80, 3); dllfunc(2, id); set_hudmessage("HamFilter", 255, "HamFilter", -1082130432, 1041865114, "HamFilter", 1065353216, 1077936128, 1036831949, 1036831949, -1); show_hudmessage(id, "[VIP] Ai primit respawn automat."); message_begin(1, get_user_msgid("ScreenFade"), 4360, id); write_short(1024); write_short(1024); write_short("HamFilter"); write_byte("HamFilter"); write_byte("HamFilter"); write_byte(200); write_byte(75); message_end(); return 0; } public print_viplist(user) { new adminnames[33][32] = { { 3, 91, 77, 78, 88, 93, 32, 4, 86, 73, 80, 39, 115, 32, 79, 110, 108, 105, 110, 101, 1, 58, 4, 32, 0, 37, 115, 37, 115, 32, 0, 44 }, { 32, 0, 0, 32, 0, 3, 91, 77, 78, 88, 93, 32, 1, 78, 117, 32, 101, 115, 116, 101, 32, 110, 105, 99, 105, 32, 117, 110, 32, 4, 86, 73 }, { 80, 32, 1, 111, 110, 108, 105, 110, 101, 46, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 83, 97, 121, 84, 101, 120, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, ... }, { 0, ... }, { 0, ... }, { 0, ... }, { 0, ... }, { 0, ... }, { 0, ... }, { 0, ... }, { 0, ... }, { 0, ... }, { 0, ... }, { 0, ... }, { 0, ... }, { 0, ... }, { 0, ... }, { 0, ... }, { 0, ... }, { 0, ... }, { 0, ... }, { 0, ... }, { 0, ... }, { 0, ... }, { 0, ... }, { 0, ... }, { 0, ... }, { 0, ... }, { 0, ... }, { 0, ... }, { 0, ... } }; new message[256]; new id; new count; new x; new len; id = 1; while (get_maxplayers() >= id) { if (is_user_connected(id)) { if (isvip(id)) { count++; get_user_name(id, adminnames[count], 31); } } id++; } if (0 < count) { len = format(message, 255, 4504); x = 0; while (x < count) { new var1; if (x < count + -1) { var1 = 4628; } else { var1 = 4640; } len = format(message[len], 255 - len, "%s%s ", adminnames[x], var1) + len; if (len > 96) { print_message(user, message); len = format(message, 255, 4644); } x++; } } else { len = format(message[len], 255 - len, "\x03[MNX] \x01Nu este nici un \x04VIP \x01online.") + len; } print_message(user, message); return 0; } public paint_handler(id) { new var1; if (!isvip(id) || !is_user_alive(id) || !is_user_connected(id)) { return 1; } static cmd[2]; read_argv("HamFilter", cmd, 1); switch (cmd[0]) { case 43: { is_drawing[id] = 1; } case 45: { is_drawing[id] = 0; } default: { } } return 1; } public forward_FM_PlayerPreThink(id) { new var2 = prethink_counter[id]; var2++; if (5 < var2) { new var1; if (is_drawing[id] && !is_aiming_at_sky(id)) { static Float:distance; static Float:cur_origin[3]; if (!is_holding[id]) { fm_get_aim_origin(id, origin[id]); move_toward_client(id, origin[id]); is_holding[id] = 1; return 1; } fm_get_aim_origin(id, origin[id]); move_toward_client(id, origin[id]); distance = get_distance_f(origin[id], cur_origin); if (distance > 2.8E-45) { draw_line(origin[id], cur_origin); } } else { is_holding[id] = 0; } prethink_counter[id] = 0; } return 1; } draw_line(Float:origin1[3], Float:origin2[3]) { message_begin("HamFilter", 23, 4828, "HamFilter"); write_byte("HamFilter"); engfunc(71, origin1); engfunc(71, origin1[1]); engfunc(71, origin1[2]); engfunc(71, origin2); engfunc(71, origin2[1]); engfunc(71, origin2[2]); write_short(spriteid); write_byte("HamFilter"); write_byte(10); write_byte(255); write_byte(50); write_byte("HamFilter"); write_byte(random(255)); write_byte(random(255)); write_byte(random(255)); write_byte(255); write_byte("HamFilter"); message_end(); return 0; } fm_get_aim_origin(index, Float:origin[3]) { static Float:view_ofs[3]; static Float:start[3]; pev(index, 118, start); pev(index, 135, view_ofs); xs_vec_add(start, view_ofs, start); static Float:dest[3]; pev(index, 126, dest); engfunc(17, dest); global_get(28, dest); xs_vec_mul_scalar(dest, 9999.0, dest); xs_vec_add(start, dest, dest); engfunc(29, start, dest, 0, index, 0); get_tr2("HamFilter", 5, origin); return 1; } move_toward_client(id, Float:origin[3]) { static Float:player_origin[3]; pev(id, 118, player_origin); new var4 = origin; new var1; if (player_origin[0] > origin[0]) { var1 = 1065353216; } else { var1 = -1082130432; } var4[0] = floatadd(var4[0], var1); new var5 = origin[1]; new var2; if (player_origin[1] > origin[1]) { var2 = 1065353216; } else { var2 = -1082130432; } var5 = floatadd(var5, var2); new var6 = origin[2]; new var3; if (player_origin[2] > origin[2]) { var3 = 1065353216; } else { var3 = -1082130432; } var6 = floatadd(var6, var3); return 0; } bool:is_aiming_at_sky(index) { new Float:origin[3] = 0.0; fm_get_aim_origin(index, origin); return engfunc(spriteid, origin) == -6; } print_message(id, msg[]) { message_begin(1, get_user_msgid("SayText"), 4920, id); write_byte(id); write_string(msg); message_end(); return 0; }