04-12-12, 18:20 (This post was last modified: 04-12-12, 18:22 by akcaliberkk.)
PHP Code:
/***********************************************************************************\ * Hook By P34nut * Thanks to Joka69, Chaosphere for testing and stuff! * ************************************************************************************* * Commands/ bindings: * +hook to throw the hook * -hook to delete your hook * * Cvars: * sv_hook - Turns hook on or off * sv_hookthrowspeed - Throw speed (default: 1000) * sv_hookspeed - Speed to hook (default: 300) * sv_hookwidth - Width of the hook (default: 32) * sv_hooksound - Sounds of the hook on or off (default: 1) * sv_hookcolor - The color of the hook 0 is white and 1 is team color (default: 1) * sv_hookplayers - If set 1 you can hook on players (default: 0) * sv_hookinterrupt - Remove the hook when something comes in its line (default: 0) * sv_hookadminonly - Hook for admin only (default: 0) * sv_hooksky - If set 1 you can hook in the sky (default: 0) * sv_hookopendoors - If set 1 you can open doors with the hook (default: 1) * sv_hookbuttons - If set 1 you can use buttons with the hook (default: 0) * sv_hookpickweapons - If set 1 you can pickup weapons with the hook (default: 1) * sv_hookhostflollow - If set 1 you can make hostages follow you (default 1) * sv_hookinstant - Hook doesnt throw (default: 0) * sv_hooknoise - adds some noise to the hook line (default: 0) * sv_hookmax - Maximun numbers of hooks a player can use in 1 round * - 0 for infinitive hooks (default: 0) * sv_hookdelay - delay on the start of each round before a player can hook * - 0.0 for no delay (default: 0.0) * * ChangeLog: * 1.0: Release * 1.5: added cvars: * sv_hooknoise * sv_hookmax * sv_hookdelay * public cvar: sv_amxxhookmod * added commands: * amx_givehook <username> * amx_takehook <username> * \***********************************************************************************/
register_concmd("amx_givehook", "give_hook", ADMINLEVEL, "<Username> - Give somebody access to the hook") register_concmd("amx_takehook", "take_hook", ADMINLEVEL, "<UserName> - Take away somebody his access to the hook")
// Hook Sounds engfunc(EngFunc_PrecacheSound, "weapons/xbow_hit1.wav") // good hit engfunc(EngFunc_PrecacheSound, "weapons/xbow_hit2.wav") // wrong hit
engfunc(EngFunc_PrecacheSound, "weapons/xbow_hitbod1.wav") // player hit
if (get_pcvar_num(pHook) && is_user_alive(id) && canThrowHook[id] && !gHooked[id]) { if (get_pcvar_num(pAdmin)) { // Only the admins can throw the hook // if(is_user_admin(id)) { <- does not work... if (!(get_user_flags(id) & ADMINLEVEL) && !g_bHookAllowed[id]) { // Show a message client_print(id, print_chat, "[Hook] Bunu Kullanmak Icin Yetkiniz Yok")
return PLUGIN_HANDLED } } if(get_pcvar_num(pCtOnly)) { if(get_user_team(id) != 2) { client_print(id,print_chat,"[Hook] Sadece CT Takimi Hook Kullanabilir") return PLUGIN_HANDLED } } new iMaxHooks = get_pcvar_num(pMaxHooks) if (iMaxHooks > 0) { if (gHooksUsed[id] >= iMaxHooks) { client_print(id, print_chat, "[Hook] Hook Limitin Doldu Artik Hook Kullanamazsin !") statusMsg(id, "[Hook] %d of %d hooks used.", gHooksUsed[id], get_pcvar_num(pMaxHooks))
return PLUGIN_HANDLED } else { gHooksUsed[id]++ statusMsg(id, "[Hook] %d of %d hooks used.", gHooksUsed[id], get_pcvar_num(pMaxHooks)) } } new Float:fDelay = get_pcvar_float(pRndStartDelay) if (fDelay > 0 && !rndStarted) client_print(id, print_chat, "[Hook] Ilk %0.0f Saniye Boyunca Hook Kullanamazsin !", fDelay)
throw_hook(id) } return PLUGIN_HANDLED }
public del_hook(id) { // Remove players hook if (!canThrowHook[id]) remove_hook(id)
return PLUGIN_HANDLED }
public round_bstart() { // Round is not started anymore if (rndStarted) rndStarted = false
// Remove all hooks for (new i = 1; i <= gMaxPlayers; i++) { if (is_user_connected(i)) { if(!canThrowHook[i]) remove_hook(i) } } }
public round_estart() { new Float:fDelay = get_pcvar_float(pRndStartDelay) if (fDelay > 0.0) set_task(fDelay, "rndStartDelay") else { // Round is started... if (!rndStarted) rndStarted = true } }
public rndStartDelay() { if (!rndStarted) rndStarted = true }
public Restart() { for (new id = 0; id < gMaxPlayers; id++) { if (is_user_connected(id)) gRestart[id] = true } }
public Update(id) { if (!gUpdate[id]) gUpdate[id] = true
return PLUGIN_CONTINUE }
public ResetHUD(id) { if (gRestart[id]) { gRestart[id] = false return } if (gUpdate[id]) { gUpdate[id] = false return } if (gHooked[id]) { remove_hook(id) } if (get_pcvar_num(pMaxHooks) > 0) { gHooksUsed[id] = 0 statusMsg(0, "[Hook] 0 of %d hooks used.", get_pcvar_num(pMaxHooks)) } }
public fwTouch(ptr, ptd) { if (!pev_valid(ptr)) return FMRES_IGNORED
new id = pev(ptr, pev_owner)
// Get classname static szPtrClass[32] pev(ptr, pev_classname, szPtrClass, charsmax(szPtrClass))
if (equali(szPtrClass, "Hook")) { static Float:fOrigin[3] pev(ptr, pev_origin, fOrigin)
if (pev_valid(ptd)) { static szPtdClass[32] pev(ptd, pev_classname, szPtdClass, charsmax(szPtdClass))
if (!get_pcvar_num(pPlayers) && /*equali(szPtdClass, "player")*/ is_user_alive(ptd)) { // Hit a player if (get_pcvar_num(pSound)) emit_sound(ptr, CHAN_STATIC, "weapons/xbow_hitbod1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM) remove_hook(id)
return FMRES_HANDLED } else if (equali(szPtdClass, "hostage_entity")) { // Makes an hostage follow if (get_pcvar_num(pHostage) && get_user_team(id) == 2) { //cs_set_hostage_foll(ptd, (cs_get_hostage_foll(ptd) == id) ? 0 : id) // With the use function we have the sounds! dllfunc(DLLFunc_Use, ptd, id) } if (!get_pcvar_num(pPlayers)) { if(get_pcvar_num(pSound)) emit_sound(ptr, CHAN_STATIC, "weapons/xbow_hitbod1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM) remove_hook(id) } return FMRES_HANDLED } else if (get_pcvar_num(pOpenDoors) && equali(szPtdClass, "func_door") || equali(szPtdClass, "func_door_rotating")) { // Open doors // Double doors tested in de_nuke and de_wallmart static szTargetName[32] pev(ptd, pev_targetname, szTargetName, charsmax(szTargetName)) if (strlen(szTargetName) > 0) { static ent while ((ent = engfunc(EngFunc_FindEntityByString, ent, "target", szTargetName)) > 0) { static szEntClass[32] pev(ent, pev_classname, szEntClass, charsmax(szEntClass))
if (equali(szEntClass, "trigger_multiple")) { dllfunc(DLLFunc_Touch, ent, id) goto stopdoors // No need to touch anymore } } }
// No double doors.. just touch it dllfunc(DLLFunc_Touch, ptd, id) stopdoors: } else if (get_pcvar_num(pUseButtons) && equali(szPtdClass, "func_button")) { if (pev(ptd, pev_spawnflags) & SF_BUTTON_TOUCH_ONLY) dllfunc(DLLFunc_Touch, ptd, id) // Touch only else dllfunc(DLLFunc_Use, ptd, id) // Use Buttons } }
// If cvar sv_hooksky is 0 and hook is in the sky remove it! new iContents = engfunc(EngFunc_PointContents, fOrigin) if (!get_pcvar_num(pHookSky) && iContents == CONTENTS_SKY) { if(get_pcvar_num(pSound)) emit_sound(ptr, CHAN_STATIC, "weapons/xbow_hit2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM) remove_hook(id) return FMRES_HANDLED }
// Pick up weapons.. if (get_pcvar_num(pWeapons)) { static ent while ((ent = engfunc(EngFunc_FindEntityInSphere, ent, fOrigin, 15.0)) > 0) { static szentClass[32] pev(ent, pev_classname, szentClass, charsmax(szentClass))
// Player is now hooked gHooked[id] = true // Play sound if (get_pcvar_num(pSound)) emit_sound(ptr, CHAN_STATIC, "weapons/xbow_hit1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
// Make some sparks :D message_begin_f(MSG_BROADCAST, SVC_TEMPENTITY, fOrigin, 0) write_byte(9) // TE_SPARKS write_coord_f(fOrigin[0]) // Origin write_coord_f(fOrigin[1]) write_coord_f(fOrigin[2]) message_end()
// Stop the hook from moving set_pev(ptr, pev_velocity, Float:{0.0, 0.0, 0.0}) set_pev(ptr, pev_movetype, MOVETYPE_NONE)
//Task if (!task_exists(id + 856)) { static TaskData[2] TaskData[0] = id TaskData[1] = ptr gotohook(TaskData)
// If user is behind a box or something.. remove it // only works if sv_interrupt 1 or higher is if (get_pcvar_num(pInterrupt) && rndStarted) { static Float:usrOrigin[3] pev(id, pev_origin, usrOrigin)
// If cvar sv_hooksky is 0 and hook is in the sky remove it! new iContents = engfunc(EngFunc_PointContents, entOrigin) if (!get_pcvar_num(pHookSky) && iContents == CONTENTS_SKY) { if(get_pcvar_num(pSound)) emit_sound(HookEnt, CHAN_STATIC, "weapons/xbow_hit2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM) remove_hook(id) }
return PLUGIN_HANDLED }
public gotohook(param[]) { new id = param[0] new HookEnt = param[1]
if (!is_user_alive(id) || !pev_valid(HookEnt) || !pev_valid(id)) { remove_task(id + 856) return PLUGIN_HANDLED } // If the round isnt started velocity is just 0 static Float:fVelocity[3] fVelocity = Float:{0.0, 0.0, 1.0}
// If the round is started and player is hooked we can set the user velocity! if (rndStarted && gHooked[id]) { static Float:fHookOrigin[3], Float:fUsrOrigin[3], Float:fDist pev(HookEnt, pev_origin, fHookOrigin) pev(id, pev_origin, fUsrOrigin)
fDist = vector_distance(fHookOrigin, fUsrOrigin)
if (fDist >= 30.0) { new Float:fSpeed = get_pcvar_float(pSpeed)
public throw_hook(id) { // Get origin and angle for the hook static Float:fOrigin[3], Float:fAngle[3],Float:fvAngle[3] static Float:fStart[3] pev(id, pev_origin, fOrigin)
// Make the line between Hook and Player message_begin_f(MSG_BROADCAST, SVC_TEMPENTITY, Float:{0.0, 0.0, 0.0}, 0) if (get_pcvar_num(pInstant)) { write_byte(1) // TE_BEAMPOINT write_short(id) // Startent write_coord_f(fStart[0]) // End pos write_coord_f(fStart[1]) write_coord_f(fStart[2]) } else { write_byte(8) // TE_BEAMENTS write_short(id) // Start Ent write_short(Hook[id]) // End Ent } write_short(sprBeam) // Sprite write_byte(1) // StartFrame write_byte(1) // FrameRate write_byte(600) // Life write_byte(get_pcvar_num(pWidth)) // Width write_byte(get_pcvar_num(pHookNoise)) // Noise // Colors now if (get_pcvar_num(pColor)) { if (get_user_team(id) == 1) // Terrorist { write_byte(255) // R write_byte(0) // G write_byte(0) // B } #if defined _cstrike_included else if(cs_get_user_vip(id)) // vip for cstrike { write_byte(0) // R write_byte(255) // G write_byte(0) // B } #endif // _cstrike_included else if(get_user_team(id) == 2) // CT { write_byte(0) // R write_byte(0) // G write_byte(255) // B } else { write_byte(255) // R write_byte(255) // G write_byte(255) // B } } else { write_byte(255) // R write_byte(255) // G write_byte(255) // B } write_byte(192) // Brightness write_byte(0) // Scroll speed message_end()
public remove_hook(id) { //Player can now throw hooks canThrowHook[id] = true
// Remove the hook if it is valid if (pev_valid(Hook[id])) engfunc(EngFunc_RemoveEntity, Hook[id]) Hook[id] = 0
// Remove the line between user and hook if (is_user_connected(id)) { message_begin(MSG_BROADCAST, SVC_TEMPENTITY, {0,0,0}, id) write_byte(99) // TE_KILLBEAM write_short(id) // entity message_end() }
// Player is not hooked anymore gHooked[id] = false return 1 }
public give_hook(id, level, cid) { if (!cmd_access(id ,level, cid, 1)) return PLUGIN_HANDLED
if (!get_pcvar_num(pAdmin)) { console_print(id, "[Hook] Sadece-Admin Modu Suan Kapali !") return PLUGIN_HANDLED }
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/
/***********************************************************************************\ * Hook By P34nut * Thanks to Joka69, Chaosphere for testing and stuff! * ************************************************************************************* * Commands/ bindings: * +hook to throw the hook * -hook to delete your hook * * Cvars: * sv_hook - Turns hook on or off * sv_hookthrowspeed - Throw speed (default: 1000) * sv_hookspeed - Speed to hook (default: 300) * sv_hookwidth - Width of the hook (default: 32) * sv_hooksound - Sounds of the hook on or off (default: 1) * sv_hookcolor - The color of the hook 0 is white and 1 is team color (default: 1) * sv_hookplayers - If set 1 you can hook on players (default: 0) * sv_hookinterrupt - Remove the hook when something comes in its line (default: 0) * sv_hookadminonly - Hook for admin only (default: 0) * sv_hooksky - If set 1 you can hook in the sky (default: 0) * sv_hookopendoors - If set 1 you can open doors with the hook (default: 1) * sv_hookbuttons - If set 1 you can use buttons with the hook (default: 0) * sv_hookpickweapons - If set 1 you can pickup weapons with the hook (default: 1) * sv_hookhostflollow - If set 1 you can make hostages follow you (default 1) * sv_hookinstant - Hook doesnt throw (default: 0) * sv_hooknoise - adds some noise to the hook line (default: 0) * sv_hookmax - Maximun numbers of hooks a player can use in 1 round * - 0 for infinitive hooks (default: 0) * sv_hookdelay - delay on the start of each round before a player can hook * - 0.0 for no delay (default: 0.0) * * ChangeLog: * 1.0: Release * 1.5: added cvars: * sv_hooknoise * sv_hookmax * sv_hookdelay * public cvar: sv_amxxhookmod * added commands: * amx_givehook <username> * amx_takehook <username> * \***********************************************************************************/
register_concmd("amx_givehook", "give_hook", ADMINLEVEL, "<Username> - Give somebody access to the hook") register_concmd("amx_takehook", "take_hook", ADMINLEVEL, "<UserName> - Take away somebody his access to the hook")
// Hook Sounds engfunc(EngFunc_PrecacheSound, "weapons/xbow_hit1.wav") // good hit engfunc(EngFunc_PrecacheSound, "weapons/xbow_hit2.wav") // wrong hit
engfunc(EngFunc_PrecacheSound, "weapons/xbow_hitbod1.wav") // player hit
if (get_pcvar_num(pHook) && is_user_alive(id) && canThrowHook[id] && !gHooked[id]) { if (get_pcvar_num(pAdmin)) { // Only the admins can throw the hook // if(is_user_admin(id)) { <- does not work... if (!(get_user_flags(id) & ADMINLEVEL) && !g_bHookAllowed[id]) { // Show a message client_print(id, print_chat, "[Hook] Bunu Kullanmak Icin Yetkiniz Yok")
return PLUGIN_HANDLED } } if(get_pcvar_num(pCtOnly)) { if(get_user_team(id) != 2) { client_print(id,print_chat,"[Hook] Sadece CT Takimi Hook Kullanabilir") return PLUGIN_HANDLED } } new iMaxHooks = get_pcvar_num(pMaxHooks) if (iMaxHooks > 0) { if (gHooksUsed[id] >= iMaxHooks) { client_print(id, print_chat, "[Hook] Hook Limitin Doldu Artik Hook Kullanamazsin !") statusMsg(id, "[Hook] %d of %d hooks used.", gHooksUsed[id], get_pcvar_num(pMaxHooks))
return PLUGIN_HANDLED } else { gHooksUsed[id]++ statusMsg(id, "[Hook] %d of %d hooks used.", gHooksUsed[id], get_pcvar_num(pMaxHooks)) } } new Float:fDelay = get_pcvar_float(pRndStartDelay) if (fDelay > 0 && !rndStarted) client_print(id, print_chat, "[Hook] Ilk %0.0f Saniye Boyunca Hook Kullanamazsin !", fDelay)
throw_hook(id) } return PLUGIN_HANDLED }
public del_hook(id) { // Remove players hook if (!canThrowHook[id]) remove_hook(id)
return PLUGIN_HANDLED }
public round_bstart() { // Round is not started anymore if (rndStarted) rndStarted = false
// Remove all hooks for (new i = 1; i <= gMaxPlayers; i++) { if (is_user_connected(i)) { if(!canThrowHook[i]) remove_hook(i) } } }
public round_estart() { new Float:fDelay = get_pcvar_float(pRndStartDelay) if (fDelay > 0.0) set_task(fDelay, "rndStartDelay") else { // Round is started... if (!rndStarted) rndStarted = true } }
public rndStartDelay() { if (!rndStarted) rndStarted = true }
public Restart() { for (new id = 0; id < gMaxPlayers; id++) { if (is_user_connected(id)) gRestart[id] = true } }
public Update(id) { if (!gUpdate[id]) gUpdate[id] = true
return PLUGIN_CONTINUE }
public ResetHUD(id) { if (gRestart[id]) { gRestart[id] = false return } if (gUpdate[id]) { gUpdate[id] = false return } if (gHooked[id]) { remove_hook(id) } if (get_pcvar_num(pMaxHooks) > 0) { gHooksUsed[id] = 0 statusMsg(0, "[Hook] 0 of %d hooks used.", get_pcvar_num(pMaxHooks)) } }
public fwTouch(ptr, ptd) { if (!pev_valid(ptr)) return FMRES_IGNORED
new id = pev(ptr, pev_owner)
// Get classname static szPtrClass[32] pev(ptr, pev_classname, szPtrClass, charsmax(szPtrClass))
if (equali(szPtrClass, "Hook")) { static Float:fOrigin[3] pev(ptr, pev_origin, fOrigin)
if (pev_valid(ptd)) { static szPtdClass[32] pev(ptd, pev_classname, szPtdClass, charsmax(szPtdClass))
if (!get_pcvar_num(pPlayers) && /*equali(szPtdClass, "player")*/ is_user_alive(ptd)) { // Hit a player if (get_pcvar_num(pSound)) emit_sound(ptr, CHAN_STATIC, "weapons/xbow_hitbod1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM) remove_hook(id)
return FMRES_HANDLED } else if (equali(szPtdClass, "hostage_entity")) { // Makes an hostage follow if (get_pcvar_num(pHostage) && get_user_team(id) == 2) { //cs_set_hostage_foll(ptd, (cs_get_hostage_foll(ptd) == id) ? 0 : id) // With the use function we have the sounds! dllfunc(DLLFunc_Use, ptd, id) } if (!get_pcvar_num(pPlayers)) { if(get_pcvar_num(pSound)) emit_sound(ptr, CHAN_STATIC, "weapons/xbow_hitbod1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM) remove_hook(id) } return FMRES_HANDLED } else if (get_pcvar_num(pOpenDoors) && equali(szPtdClass, "func_door") || equali(szPtdClass, "func_door_rotating")) { // Open doors // Double doors tested in de_nuke and de_wallmart static szTargetName[32] pev(ptd, pev_targetname, szTargetName, charsmax(szTargetName)) if (strlen(szTargetName) > 0) { static ent while ((ent = engfunc(EngFunc_FindEntityByString, ent, "target", szTargetName)) > 0) { static szEntClass[32] pev(ent, pev_classname, szEntClass, charsmax(szEntClass))
if (equali(szEntClass, "trigger_multiple")) { dllfunc(DLLFunc_Touch, ent, id) goto stopdoors // No need to touch anymore } } }
// No double doors.. just touch it dllfunc(DLLFunc_Touch, ptd, id) stopdoors: } else if (get_pcvar_num(pUseButtons) && equali(szPtdClass, "func_button")) { if (pev(ptd, pev_spawnflags) & SF_BUTTON_TOUCH_ONLY) dllfunc(DLLFunc_Touch, ptd, id) // Touch only else dllfunc(DLLFunc_Use, ptd, id) // Use Buttons } }
// If cvar sv_hooksky is 0 and hook is in the sky remove it! new iContents = engfunc(EngFunc_PointContents, fOrigin) if (!get_pcvar_num(pHookSky) && iContents == CONTENTS_SKY) { if(get_pcvar_num(pSound)) emit_sound(ptr, CHAN_STATIC, "weapons/xbow_hit2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM) remove_hook(id) return FMRES_HANDLED }
// Pick up weapons.. if (get_pcvar_num(pWeapons)) { static ent while ((ent = engfunc(EngFunc_FindEntityInSphere, ent, fOrigin, 15.0)) > 0) { static szentClass[32] pev(ent, pev_classname, szentClass, charsmax(szentClass))
// Player is now hooked gHooked[id] = true // Play sound if (get_pcvar_num(pSound)) emit_sound(ptr, CHAN_STATIC, "weapons/xbow_hit1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
// Make some sparks :D message_begin_f(MSG_BROADCAST, SVC_TEMPENTITY, fOrigin, 0) write_byte(9) // TE_SPARKS write_coord_f(fOrigin[0]) // Origin write_coord_f(fOrigin[1]) write_coord_f(fOrigin[2]) message_end()
// Stop the hook from moving set_pev(ptr, pev_velocity, Float:{0.0, 0.0, 0.0}) set_pev(ptr, pev_movetype, MOVETYPE_NONE)
//Task if (!task_exists(id + 856)) { static TaskData[2] TaskData[0] = id TaskData[1] = ptr gotohook(TaskData)
// If user is behind a box or something.. remove it // only works if sv_interrupt 1 or higher is if (get_pcvar_num(pInterrupt) && rndStarted) { static Float:usrOrigin[3] pev(id, pev_origin, usrOrigin)
// If cvar sv_hooksky is 0 and hook is in the sky remove it! new iContents = engfunc(EngFunc_PointContents, entOrigin) if (!get_pcvar_num(pHookSky) && iContents == CONTENTS_SKY) { if(get_pcvar_num(pSound)) emit_sound(HookEnt, CHAN_STATIC, "weapons/xbow_hit2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM) remove_hook(id) }
return PLUGIN_HANDLED }
public gotohook(param[]) { new id = param[0] new HookEnt = param[1]
if (!is_user_alive(id) || !pev_valid(HookEnt) || !pev_valid(id)) { remove_task(id + 856) return PLUGIN_HANDLED } // If the round isnt started velocity is just 0 static Float:fVelocity[3] fVelocity = Float:{0.0, 0.0, 1.0}
// If the round is started and player is hooked we can set the user velocity! if (rndStarted && gHooked[id]) { static Float:fHookOrigin[3], Float:fUsrOrigin[3], Float:fDist pev(HookEnt, pev_origin, fHookOrigin) pev(id, pev_origin, fUsrOrigin)
fDist = vector_distance(fHookOrigin, fUsrOrigin)
if (fDist >= 30.0) { new Float:fSpeed = get_pcvar_float(pSpeed)
public throw_hook(id) { // Get origin and angle for the hook static Float:fOrigin[3], Float:fAngle[3],Float:fvAngle[3] static Float:fStart[3] pev(id, pev_origin, fOrigin)
// Make the line between Hook and Player message_begin_f(MSG_BROADCAST, SVC_TEMPENTITY, Float:{0.0, 0.0, 0.0}, 0) if (get_pcvar_num(pInstant)) { write_byte(1) // TE_BEAMPOINT write_short(id) // Startent write_coord_f(fStart[0]) // End pos write_coord_f(fStart[1]) write_coord_f(fStart[2]) } else { write_byte(8) // TE_BEAMENTS write_short(id) // Start Ent write_short(Hook[id]) // End Ent } write_short(sprBeam) // Sprite write_byte(1) // StartFrame write_byte(1) // FrameRate write_byte(600) // Life write_byte(get_pcvar_num(pWidth)) // Width write_byte(get_pcvar_num(pHookNoise)) // Noise // Colors now if (get_pcvar_num(pColor)) { if (get_user_team(id) == 1) // Terrorist { write_byte(255) // R write_byte(0) // G write_byte(0) // B } #if defined _cstrike_included else if(cs_get_user_vip(id)) // vip for cstrike { write_byte(0) // R write_byte(255) // G write_byte(0) // B } #endif // _cstrike_included else if(get_user_team(id) == 2) // CT { write_byte(0) // R write_byte(0) // G write_byte(255) // B } else { write_byte(255) // R write_byte(255) // G write_byte(255) // B } } else { write_byte(255) // R write_byte(255) // G write_byte(255) // B } write_byte(192) // Brightness write_byte(0) // Scroll speed message_end()
public remove_hook(id) { //Player can now throw hooks canThrowHook[id] = true
// Remove the hook if it is valid if (pev_valid(Hook[id])) engfunc(EngFunc_RemoveEntity, Hook[id]) Hook[id] = 0
// Remove the line between user and hook if (is_user_connected(id)) { message_begin(MSG_BROADCAST, SVC_TEMPENTITY, {0,0,0}, id) write_byte(99) // TE_KILLBEAM write_short(id) // entity message_end() }
// Player is not hooked anymore gHooked[id] = false return 1 }
public give_hook(id, level, cid) { if (!cmd_access(id ,level, cid, 1)) return PLUGIN_HANDLED
if (!get_pcvar_num(pAdmin)) { console_print(id, "[Hook] Sadece-Admin Modu Suan Kapali !") return PLUGIN_HANDLED }
04-12-12, 21:27 (This post was last modified: 04-12-12, 21:33 by akcaliberkk.)
Bu kod .sma kodudur. Bunları kopyalayıp bir web compiler'e veya amxx studioya yapıştırıp compile ediceksin. Bu işlem sonucunda oluşan .amxx dosyasını kurucaksın. Yapmayı bilmiyorsan hazırını indirebilirsin:
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/
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/