Hoppa till innehåll

Vart Lägger Man In Alla Phpcoder Till Sin Hlds Server?


PotTe

Rekommendera inlägg

<Hejsan jag har länge undrat vart man lägger in alla phpcoder.

här har jag en´till exempel:

 

/* AMX Mod script

*

* © 2009, fezh

* This file is provided as is (no warranties).

*

*/

 

#include <amxmodx>

#include <cstrike>

#include <fakemeta>

#include <amxmisc>

 

// Plugin Stats

#define PLUGIN "Deagle Sniper"

#define VERSION "0.1.2"

#define AUTHOR "fezh"

 

// Deagle Custom Model

new DEAGLE_MODEL[ 64 ] = "models/v_deagle_new.mdl"

 

// Zoom Array

new g_hasZoom[ 33 ]

 

// Misc Stuff

new szClip, szAmmo

 

public plugin_init()

{

// Register Plugin

register_plugin( PLUGIN, VERSION, AUTHOR )

 

// Check Current Weapon

register_event( "CurWeapon", "event_cur_weapon", "be", "1=1" )

 

// Command Start

register_forward( FM_CmdStart, "forward_cmdstart" )

 

// Plugin Version

register_cvar( "deagle_sniper", VERSION, FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_UNLOGGED|FCVAR_SPONLY )

}

 

public plugin_precache()

{

precache_model( DEAGLE_MODEL )

}

 

public client_putinserver( id )

{

set_task( 20.0, "plugin_message", id )

}

 

public forward_cmdstart( id, uc_handle, seed )

{

if( !is_user_alive( id ) || !is_user_admin(id))

return PLUGIN_HANDLED

 

if( ( get_uc( uc_handle, UC_Buttons ) & IN_ATTACK2 ) && !( pev( id, pev_oldbuttons ) & IN_ATTACK2 ) )

{

new szWeapID = get_user_weapon( id, szClip, szAmmo )

 

if( szWeapID == CSW_DEAGLE && !g_hasZoom[ id ] )

{

g_hasZoom[ id ] = true

cs_set_user_zoom( id, CS_SET_FIRST_ZOOM, 1 )

emit_sound( id, CHAN_ITEM, "weapons/zoom.wav", 0.20, 2.40, 0, 100 )

}

 

else

{ if( g_hasZoom[ id ] )

{

g_hasZoom[ id ] = false

cs_set_user_zoom( id, CS_RESET_ZOOM, 0 )

}

}

 

return PLUGIN_HANDLED

}

 

return PLUGIN_HANDLED

}

 

public event_cur_weapon( id )

{

new szWeapID = get_user_weapon( id, szClip, szAmmo )

 

if ( szWeapID == CSW_DEAGLE )

{

set_pev( id, pev_viewmodel2, DEAGLE_MODEL )

}

}

 

public plugin_message( id )

{

client_print( id, print_chat, "[AMXX] This server is running Deagle Sniper v%s", VERSION )

client_print( id, print_chat, "[AMXX] You can use the Deagle as sniper, using +attack2" )

}

 

 

jag har undrat vart och hur man lägger in dem, jag har sökt jätte mkt på google men jag fick ingen träff....'

 

"tacksam för svar" :)

Länk till kommentar
Dela på andra sajter

×
  • Skapa ny...