Deathrun models
Hello, I need to insert some skills
1.HelBoy (need to insert a lot of power) 20 sec duration 2.SPIDERMAN (high jump) 20 sec duration 3.Jab Jab (high speed max speed 500) 20 sec duration 4.Ali-G (Bunnyhop) duration of 20 sec 5.Riku (invisibility) duration of 20 sec 6.Robocop (teleports in some places) 7.Batman (blinded TT) duration of 10 sec HELP ME #include <amxmodx> #include <cstrike> #include <fun> #include <fakemeta> #include <hamsandwich> new g_player_class[33] new player_bh[33] new const g_Sound[] = "sound/misc/spiderman.mp3" new const c_Sound[] = "sound/misc/AliG.mp3" new const a_Sound[] = "sound/misc/batman11.mp3" new const b_Sound[] = "sound/misc/hellbo.mp3" new const e_Sound[] = "sound/misc/jab.mp3" new const h_Sound[] = "sound/misc/robot1.mp3" new const r_Sound[] = "sound/misc/rikku1.mp3" public plugin_init() { register_plugin("Dr_menu by \wMafinka", "1.3.5", "Mafinka") RegisterHam(Ham_Spawn,"player","player_spawn" ,1); register_forward(FM_PlayerPreThink, "bunnyhop"); } public player_spawn(id) { player_bh[id] = 0 if( is_user_alive(id) && cs_get_user_team(id) & CS_TEAM_CT ) set_task(0.5,"human_menu",id); } public plugin_precache() { precache_model("models/ProGame/hb.mdl") precache_model("models/ProGame/spiderman.mdl") precache_model("models/ProGame/jabjab.mdl") precache_model("models/ProGame/alig.mdl") precache_model("models/ProGame/Rikku.mdl") precache_model("models/ProGame/robocop.mdl") precache_model("models/ProGame/css_batman.mdl") precache_generic(g_Sound) precache_generic(c_Sound) precache_generic(a_Sound) precache_generic(b_Sound) precache_generic(e_Sound) precache_generic(h_Sound) precache_generic(r_Sound) } public human_menu(id) { new menu = menu_create("\yVyber si postavu ", "human_menu_handler") menu_additem(menu, "HellBoy \r(Velmi silny)", "1", 0) menu_additem(menu, "Spiderman \r(super skoky) \y[VIP]", "5", ADMIN_LEVEL_H) menu_additem(menu, "Jab Jab \r(Rychlost)", "3", 0) menu_additem(menu, "Ali-G \r(BunnyHop)", "4", 0) menu_additem(menu, "Riku\r(Neviditelnost) \y[VIP]", "5", ADMIN_LEVEL_H) menu_additem(menu, "Robocop \r(Teleport-Robi sa) \y[VIP]", "6", ADMIN_LEVEL_H) menu_additem(menu, "Batman \r(Oslepenie) \y[VIP]", "7", ADMIN_LEVEL_H) // NEVIDITELNOST NIECO INE menu_setprop(menu, MPROP_EXIT, MEXIT_ALL) menu_display(id, menu, 0) } public human_menu_handler(id, menu, item) { if( item == MENU_EXIT ) { menu_destroy(menu) return PLUGIN_HANDLED } new data[6], iName[64] new access, callback menu_item_getinfo(menu, item, access, data, 5, iName, 63, callback) new key = str_to_num(data) switch(key) { case 1: { if(!is_user_alive(id) ) return PLUGIN_HANDLED; //puvodne if(is_user_alive(id) ) g_player_class[id] = 1 cs_set_user_model(id,"hb") set_user_health(id, 300) set_user_armor(id, 300) set_user_gravity(id, 1.00) ChatColor(id, "!y[ProGame.6f.sk] !gVybral si si postavu: !tHelBoy") client_cmd(id,"mp3 play %s",b_Sound) } case 2: { if(!is_user_alive(id) ) return PLUGIN_HANDLED; g_player_class[id] = 2 cs_set_user_model(id,"spiderman") set_user_health(id, 100) set_user_armor(id, 100) set_user_gravity(id, 0.50) ChatColor(id, "!y[ProGame.6f.sk] !gVybral si si postavu: !tSpiderman"); client_cmd(id,"mp3 play %s",g_Sound) } case 3: { if(!is_user_alive(id) ) return PLUGIN_HANDLED g_player_class[id] = 3 cs_set_user_model(id,"jabjab") set_user_health(id, 100) set_user_armor(id, 100) set_user_gravity(id, 1.00) set_user_maxspeed(id, 320.0); ChatColor(id, "!y[ProGame.6f.sk] !gVybral si si postavu: !tJab Jab"); client_cmd(id,"mp3 play %s",e_Sound) } case 4: { if(!is_user_alive(id) ) return PLUGIN_HANDLED; player_bh[id] = 1 cs_set_user_model(id,"alig") set_user_health(id, 100) set_user_armor(id, 100) set_user_gravity(id, 1.00) ChatColor(id, "!y[ProGame.6f.sk] !gVybral si si postavu: !tAli-G"); client_cmd(id,"mp3 play %s",c_Sound) } case 5: { if(!is_user_alive(id) || !(get_user_flags(id) & ADMIN_LEVEL_H) ) return PLUGIN_HANDLED; g_player_class[id] = 5 cs_set_user_model(id,"Rikku") // !!!! set_user_health(id, 150) set_user_armor(id, 150) set_user_gravity(id, 1.00) set_user_rendering(id,kRenderFxNone,0,0,0,kRe nderTransAlpha,127) ChatColor(id, "!y[ProGame.6f.sk] !gVybral si si postavu !tRikku"); client_cmd(id,"mp3 play %s",r_Sound) } case 6: { if(!is_user_alive(id) || !(get_user_flags(id) & ADMIN_LEVEL_H) ) return PLUGIN_HANDLED; g_player_class[id] = 6 cs_set_user_model(id,"robocop") set_user_health(id, 125) set_user_armor(id, 125) set_user_gravity(id, 0.70) ChatColor(id, "!y[ProGame.6f.sk] !gVybral si si postavu: !tRobocop"); client_cmd(id,"mp3 play %s",h_Sound) } case 7: { if(!is_user_alive(id) || !(get_user_flags(id) & ADMIN_LEVEL_H) ) return PLUGIN_HANDLED; g_player_class[id] = 7 cs_set_user_model(id,"css_batman") // !!!! set_user_health(id, 100) set_user_armor(id, 100) set_user_gravity(id, 1.00) ChatColor(id, "!y[ProGame.6f.sk] !gVybral si si postavu: !tBatman"); client_cmd(id,"mp3 play %s",a_Sound) } } menu_destroy(menu) return PLUGIN_HANDLED } public bunnyhop(id) { if(!player_bh[id]) return PLUGIN_CONTINUE if (pev(id, pev_button) & IN_JUMP) { new flags = pev(id, pev_flags) if (flags & FL_WATERJUMP) return FMRES_IGNORED; if ( pev(id, pev_waterlevel) >= 2 ) return FMRES_IGNORED; if ( !(flags & FL_ONGROUND) ) return FMRES_IGNORED; new Float:velocity[3]; pev(id, pev_velocity, velocity); velocity[2] += 250.0; set_pev(id, pev_velocity, velocity); set_pev(id, pev_gaitsequence, 6); } return FMRES_IGNORED; } stock ChatColor(const id, const input[], any:...) { new count = 1, players[ 32 ] static msg[ 191 ] vformat( msg, 190, input, 3 ) replace_all( msg, 190, "!g", "^4" ) replace_all( msg, 190, "!y", "^1" ) replace_all( msg, 190, "!t", "^3" ) if(id) players[ 0 ] = id; else get_players( players, count, "ch" ) { for(new i = 0; i < count; i++) { if( is_user_connected( players[ i ] ) ) { message_begin( MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[ i ] ) write_byte( players[ i ] ) write_string( msg ) message_end( ) } } } } |
Re: Deathrun models
1- Enter the code in php
2- do not use cs_set_user_model cause svs_bad 3- you can use a const for precache sounds 4- you can use a enum for optimize this. look a example: https://forums.alliedmods.net/showpo...15&postcount=7 5- use set task for time of habilities. |
Re: Deathrun models
Please repair it to me and I'll do me very happy: D
I need it very |
Re: Deathrun models
You are in Scripting Help, you are to repair it yourself with the information we give you
|
| All times are GMT -4. The time now is 13:24. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.