April 20, 2019, 07:24:42 PM

Author Topic: Shinobi race (need help)  (Read 1349 times)

Offline Craftomega

  • Level 0 Beginner
  • Posts: 11
    • Omega's Abyss
Shinobi race (need help)
« on: June 29, 2009, 01:06:10 AM »
Here is a race i remade, i cant seem to restrict the weapons, it spawns its usp then it is still able to pick up any weapon. Is there any errors with the "player_spawn_cmd" coding?

Code: (eventscripts) [Select]
"72"
{
 "name"              "Shinobi"
 "author"            "Sniper Wolf"
 "shortdescription"  "A ninja with a gun (usp only)"
 "required_level"    "1600"
 "maximum_level"     "0"
 "allow_only"        "0"
 "teamlimit"         "0"
 "restrict_shop"     "0"
 "preloadcmd"        "0"
 "player_spawn_cmd"  "es es_xdelayed 1.1 est_RestrictAll event_var(userid);es_delayed 1.3 est_removeweapon event_var(userid);es es_xdelayed 1.4 est_unrestrict event_var(userid) knife;es es_xdelayed 1.8 est_unrestrict event_var(userid) c4;es es_xdelayed 1.8 est_unrestrict event_var(userid) defuser;es es_xdelayed 1.8 est_unrestrict event_var(userid) usp;es es_delayed 2.2 est_give event_var(userid) weapon_usp;es es_xdelayed 2.5 est_setclipammo event_var(userid) 2 80"
 "numberofskills"    "5"
 "numberoflevels"    "8"
 "skillnames"        "Invisibility | Low grav | Stun | Extra Damage | Teleport"
 "skilldescr"        "0"
 "skillcfg"          "player_spawn|player_spawn|player_attacker|player_attacker|player_ultimate"
 
 "skill1_setting"    "es_xset wcs_invis 120;es_xset wcs_alpha 50|es_xset wcs_invis 110;es_xset wcs_alpha 60|es_xset wcs_invis 100;es_xset wcs_alpha 70|es_xset wcs_invis 90;es_xset wcs_alpha 80|es_xset wcs_invis 80;es_xset wcs_alpha 90|es_xset wcs_invis 70;es_xset wcs_alpha 100|es_xset wcs_invis 60;es_xset wcs_alpha 60|es_xset wcs_invis 50;es_xset wcs_alpha 100"
 "skill1_cmd"        "es_xcopy wcs_tmp wcs_invis;es_xmath wcs_tmp float;es_xmath wcs_tmp / -2.55;es_xmath wcs_tmp + 100;es est_rounddecimal wcs_tmp server_var(wcs_tmp) 0;es_keysetvalue WCSuserdata event_var(userid) invisp server_var(wcs_tmp);es est_setplayercolor event_var(userid) 255 255 255 server_var(wcs_invis) 1;wcs_getlanguage wcs_lng wcs_lng_r_invis;es_tell event_var(userid) #multi server_var(wcs_lng)"
 "skill1_sfx"        "es_getplayerlocation wcs_x1 wcs_y1 wcs_z1 event_var(userid);es_xmath wcs_z1 + 20;es est_effect 10 #a 0 sprites/lgtning.vmt server_var(wcs_x1) server_var(wcs_y1)server_var(wcs_z1) 30 60 2 10 0 0 0 255 50 128 10"
 
 "skill2_setting"    "es_xset wcs_gravity 0.92|es_xset wcs_gravity 0.84|es_xset wcs_gravity 0.76|es_xset wcs_gravity 0.68|es_xset wcs_gravity 0.6|es_xset wcs_gravity 0.52|es_xset wcs_gravity 0.44|es_xset wcs_gravity 0.36"
 "skill2_cmd"        "es_delayed 2 est_SetGravity event_var(userid) server_var(wcs_gravity);es_keysetvalue WCSuserdata event_var(userid) gravity server_var(wcs_gravity);wcs_getlanguage wcs_lng wcs_lng_r_levitation;es_tell event_var(userid) #multi server_var(wcs_lng)"
 "skill2_sfx"        "es_getplayerlocation wcs_x1 wcs_y1 wcs_z1 event_var(userid);es est_Effect 10 #a 0 sprites/lgtning.vmt server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) 20 50 2 60 100 0.8 0 20 100 255 1"
 
 "skill3_setting"    "es_xset wcs_chance 15|es_xset wcs_chance 18|es_xset wcs_chance 21|es_xset wcs_chance 24|es_xset wcs_chance 27|es_xset wcs_chance 30|es_xset wcs_chance 31|es_xset wcs_chance 32"
 "racealias_ha3a"    "es est_Freeze event_var(userid) 1;es_delayed 1 wcs_removefx freeze event_var(userid);wcs_getlanguage wcs_lng wcs_lng_r_gotfrozenby;es_format wcs_lng server_var(wcs_lng) event_var(es_attackername);esnq est_csay event_var(userid) server_var(wcs_lng);wcs_getlanguage wcs_lng wcs_lng_r_froze;es_format wcs_lng server_var(wcs_lng) event_var(es_username);esnq est_csay event_var(attacker) server_var(wcs_lng)"
//"racealias_ha3b"    "es_setplayerprop event_var(userid) CBasePlayer.m_fFlags 32.0;es_delayed 1 wcs_removefx freeze event_var(userid);wcs_getlanguage wcs_lng wcs_lng_r_gotfrozenby;es_format wcs_lng server_var(wcs_lng) event_var(es_attackername);esnq est_csay event_var(userid) server_var(wcs_lng);wcs_getlanguage wcs_lng wcs_lng_r_froze;es_format wcs_lng server_var(wcs_lng) event_var(es_username);esnq est_csay event_var(attacker) server_var(wcs_lng)"
 "skill3_cmd"        "if (server_var(wcs_dice) <= server_var(wcs_chance)) then est_IsAlive wcs_alive event_var(userid);if (server_var(wcs_dice) <= server_var(wcs_chance)) then es_xif (server_var(wcs_alive) = 1) then racealias_ha3a"
 "skill3_sfx"        "if (server_var(wcs_dice) <= server_var(wcs_chance)) then es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 event_var(userid);if (server_var(wcs_dice) <= server_var(wcs_chance)) then es_xif (server_var(wcs_alive) = 1) then est_effect 11 #a 0 sprites/lgtning.vmt server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) 1 2.3 90"
 
 "skill4_setting"    "es_xset wcs_multiplier 0.2|es_xset wcs_multiplier 0.24|es_xset wcs_multiplier 0.32|es_xset wcs_multiplier 0.40|es_xset wcs_multiplier 0.44|es_xset wcs_multiplier 0.48|es_xset wcs_multiplier 0.52|es_xset wcs_multiplier 0.56"
 "racealias_shot"    "es_set wcs_dmg event_var(dmg_health);es_xmath wcs_dmg float;es_math wcs_dmg * 0.35;es est_rounddecimal wcs_dmg server_var(wcs_dmg) 0;es wcs_dealdamage event_var(attacker) event_var(userid) server_var(wcs_dmg);wcs_getlanguage wcs_lng wcs_lng_damage;esnq est_csay event_var(attacker) + server_var(wcs_dmg) server_var(wcs_lng);esnq est_csay event_var(userid) + server_var(wcs_dmg) Due to a shadow"
 "racealias_pist"    "es_set wcs_dmg event_var(dmg_health);es_xmath wcs_dmg float;es_math wcs_dmg * server_var(wcs_multiplier);es est_rounddecimal wcs_dmg server_var(wcs_dmg) 0;es wcs_dealdamage event_var(attacker) event_var(userid) server_var(wcs_dmg);wcs_getlanguage wcs_lng wcs_lng_damage;esnq est_csay event_var(attacker) + server_var(wcs_dmg) server_var(wcs_lng);esnq est_csay event_var(userid) + server_var(wcs_dmg) Due to a shadow"
 "skill4_cmd"        "es est_IsAlive wcs_alive event_var(userid);if (server_var(wcs_alive) = 1) then es_xif (event_var(weapon) = weapon_usp) then racealias_shot
 "skill4_sfx"        "es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 event_var(attacker);es es_xgetplayerlocation wcs_x2 wcs_y2 wcs_z2 event_var(userid);es est_effect 3 #a 0 sprites/halo01.vmt server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) server_var(wcs_x2) server_var(wcs_y2) server_var(wcs_z2) 1 5 5 200 20 20 255"
 
 
 "skill5_setting"    "es_xsetinfo wcs_range 750;es_xsetinfo wcs_fadetimer 0.10|es_xsetinfo wcs_range 775;es_xsetinfo wcs_fadetimer 0.08|es_xsetinfo wcs_range 800;es_xsetinfo wcs_fadetimer 0.06|es_xsetinfo wcs_range 825;es_xsetinfo wcs_fadetimer 0.04|es_xsetinfo wcs_range 850;es_xsetinfo wcs_fadetimer 0.0|es_xsetinfo wcs_range 875;es_xsetinfo wcs_fadetimer 0.0|es_xsetinfo wcs_range 900;es_xsetinfo wcs_fadetimer 0.0|es_xsetinfo wcs_range 1000;es_xsetinfo wcs_fadetimer 0.0"
 "skill5_cmd"        "es_xdoblock wcs/WCSultimates/wcs_ulti_teleport"
 "skill5_sfx"        "es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 server_var(wcs_userid);es est_effect 7 #a 0 sprites/smoke.vmt server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) 40 1"
 "ultimate_cooldown" "4"
}
« Last Edit: June 29, 2009, 01:10:05 AM by Sniper Wolf »

Offline maze

  • Level 7 Expert
  • *****
  • Posts: 232
Re: Shinobi race (need help)
« Reply #1 on: June 29, 2009, 01:29:38 AM »
is this set?
est_enable_weapon_restrictions 1 in es_tools.cfg

you could use this (wcs 0.77):
Code: [Select]

"player_spawn_cmd"  "es wcs_restrict event_var(userid) allow usp 1 1 0;es es_xdelayed 1 est_setclipammo event_var(userid) 2 80"

you can add this if you want more weapons allowed:
es wcs_restrict event_var(userid) addallow glock

« Last Edit: June 29, 2009, 12:29:13 PM by maze »

Offline Craftomega

  • Level 0 Beginner
  • Posts: 11
    • Omega's Abyss
Re: Shinobi race (need help)
« Reply #2 on: June 29, 2009, 05:15:31 AM »
Ok now when i spawn i dont get my 80 ammo

;es es_xdelayed 2.5 est_setclipammo event_var(userid) 2 80

am i missing something?

Offline maze

  • Level 7 Expert
  • *****
  • Posts: 232
Re: Shinobi race (need help)
« Reply #3 on: June 29, 2009, 11:45:43 AM »
Code: [Select]
"player_spawn_cmd"  "es wcs_restrict event_var(userid) allow usp 1 1 0;es es_delayed 0.9 est_setammo event_var(userid) 2 160;es es_delayed 1 est_setclipammo event_var(userid) 2 80"
you have 80 bullets in your clip + 160 bullets extra. the clip will only be filled once with 80 bullets.
Ok now when i spawn i dont get my 80 ammo

;es es_xdelayed 2.5 est_setclipammo event_var(userid) 2 80

am i missing something?


if you are using your version...
make a bigger delay.  ...;es es_xdelayed 3 est_setclipammo event_var(userid) 2 80"  should do it.
« Last Edit: June 29, 2009, 12:30:56 PM by maze »

Offline windwalker

  • Level 0 Beginner
  • Posts: 1
Re: Shinobi race (need help)
« Reply #4 on: October 25, 2009, 04:16:36 AM »
This race is cool can you post a completed working version??? anyone please!