Co trzeba zmienić w sma zeby immunited head nie byl brany pod uwage po wpisaniu komendy ??
sma pluga:
/************************************************************
* AMXX Idiot plugin 1.0
*
* This plugin is created by IJs, forum thread:
*
*
* USAGE:
* This plugin can be used by admins to turn players into
* so called 'idiots'. The model will change into a quite
* funny and ridiculous character (some kind of Star Trek
* frog-alike person), the victim loses his weapons and
* can only knife, and of course.. as soon as the admin
* gives the command to idiotify someone, it will be
* announced and the known "You are an idiot" sound, which
* some of you well know, will be played.
*
* Just compile this .sma script and copy the plugin (or
* the supplied .amx file) to your addons/amx/plugins
* directory, and add this to your plugins.ini file:
*
* amx_idiot.amx
*
* Now, to use the idiot plugin, you just use the following
* commands in console:
*
* amx_idiot <name> - turns the player into an idiot
* amx_unidiot <name> - restores the player
*
*
************************************************************/
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <cstrike>
new is_idiot[33]
public toknifePred(id) {
if (is_idiot[id] == 1) {
new wpn = read_data(2)
if (wpn == 6) {
return PLUGIN_CONTINUE
}
else {
engclient_cmd(id,"weapon_knife")
return PLUGIN_CONTINUE
}
}
return PLUGIN_CONTINUE
}
public Vexd_PlayerModel(id,level,cid){
if (!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED
new arg[32]
read_argv(1,arg,31)
new player = cmd_target(id,arg,5)
new Datastr[12]
read_argv(2,Datastr,12)
new Data = str_to_num(Datastr)
if (!player) return PLUGIN_HANDLED
new authid[16],name2[32],authid2[16],name[32]
get_user_authid(id,authid,15)
get_user_name(id,name,31)
get_user_authid(player,authid2,15)
get_user_name(player,name2,31)
if (Data==0) {
cs_set_user_model(player, "trekker")
set_hudmessage(200,0,0, 0.03, 0.76, 2, 0.02, 1.0, 0.01, 0.1, 2)
show_hudmessage(0,"ROFL! %s has been turned into an idiot!",name2)
// } else if (Data==1) {
// cs_set_user_model(player, "hanky")
// show_hudmessage(0,"OH NOOO! %s has been turned into Mr. Hanky!",name2)
} else {
client_print(id,print_console,"[AMX] Wrong model parameter")
return PLUGIN_HANDLED
}
client_cmd(0, "spk ambience/idiot.wav")
engclient_cmd(player,"weapon_knife")
client_print(id,print_console,"[AMX] User is now an idiot")
is_idiot[player] = 1
return PLUGIN_HANDLED_MAIN
}
public Vexd_ClearModel(id,level,cid) {
if (!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED
new arg[32]
read_argv(1,arg,31)
new player = cmd_target(id,arg,5)
if (!player) return PLUGIN_HANDLED
new authid[16],name2[32],authid2[16],name[32]
get_user_authid(id,authid,15)
get_user_name(id,name,31)
get_user_authid(player,authid2,15)
get_user_name(player,name2,31)
cs_reset_user_model(player)
client_print(id,print_console,"[AMX] User is restored to normal again")
is_idiot[player] = 0
return PLUGIN_HANDLED_MAIN
}
public newround(id){
is_idiot[0] = 0
is_idiot[1] = 0
is_idiot[2] = 0
is_idiot[3] = 0
is_idiot[4] = 0
is_idiot[5] = 0
is_idiot[6] = 0
is_idiot[7] = 0
is_idiot[8] = 0
is_idiot[9] = 0
is_idiot[10] = 0
is_idiot[11] = 0
is_idiot[12] = 0
is_idiot[13] = 0
is_idiot[14] = 0
is_idiot[15] = 0
is_idiot[16] = 0
is_idiot[17] = 0
is_idiot[18] = 0
is_idiot[19] = 0
is_idiot[20] = 0
//dodgy coding, i was lazy <img src='https://amxx.pl/public/style_emoticons/<#EMO_DIR#>/wink.gif' class='bbc_emoticon' alt=';)' />
return PLUGIN_CONTINUE
}
public plugin_precache()
{
precache_model("models/player/trekker/trekker.mdl")
precache_sound("ambience/idiot.wav")
return PLUGIN_CONTINUE
}
public plugin_init(){
register_event("CurWeapon","toknifePred","be","1=1")
register_plugin("Idiot Model change (CS)","1.00","IJs")
register_event("ResetHUD","newround", "be")
register_concmd("amx_idiot","Vexd_PlayerModel",ADMIN_KICK,"<authid, nick or #userid> <0=mr. hanky - 1=trekker>")
register_concmd("amx_unidiot","Vexd_ClearModel",ADMIN_KICK,"<authid, nick or #userid>")
return PLUGIN_CONTINUE
}
na razie nie ogarniam jeszcze amx na tyle by samemu to wykminic wiec bardzo proszę o pomoc. Z gory thx


Dodatki SourceMod



Temat jest zamknięty








