Raised This Month: $ Target: $400
 0% 

Round Start Error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jim_yang
Veteran Member
Join Date: Aug 2006
Old 12-21-2006 , 23:31   Re: Round Start Error
Reply With Quote #1

If I had told you that before, I was definitely having drugs that time.
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
The Specialist
BANNED
Join Date: Nov 2006
Old 12-22-2006 , 02:09   Re: Round Start Error
Reply With Quote #2

This works good now . Does any one see any errors I made ?

Code:
  #include <amxmodx> #include <fakemeta> #include <cstrike> new g_Switch; new g_TSamari; new g_CTSamari; new sprite; new Float: origin[3]; new Lightning; new Float: VictomOrigin[3]; new Float: AttackerOrigin[3]; new Weapon; new Float:frags; public plugin_init() {  register_plugin("The Samari","0.3","The Specialist");  g_Switch = register_cvar("smr_switch","1");    register_event("HLTV", "RoundStart", "a", "1=0", "2=0");  register_event("CurWeapon","SamariModel","be","1=1");  register_event("Damage" , "SamariDamage" , "be");    register_forward(FM_PlayerPreThink,"MakeSamariSmoke"); } public RoundStart() {  if(get_pcvar_num(g_Switch))  {   g_CTSamari = 0;   g_TSamari = 0;     new Terrorist[32],T_num;   get_players(Terrorist,T_num,"ace","TERRORIST");   g_TSamari = Terrorist[random_num(0,T_num-1)];     new CTs[32],CT_num;   get_players(CTs,CT_num,"ace","CT");   g_CTSamari = CTs[random_num(0,CT_num-1)];   return;  } } public MakeSamariSmoke(id) {  if((g_CTSamari == id || g_TSamari == id) && ( pev(id,pev_button) &  IN_USE  ))  {    pev(id,pev_origin,origin);   message_begin(MSG_BROADCAST ,SVC_TEMPENTITY);   write_byte(5);   engfunc(EngFunc_WriteCoord,origin[0]);   engfunc(EngFunc_WriteCoord,origin[1]);   engfunc(EngFunc_WriteCoord,origin[2]);   write_short(sprite);   write_byte(255);   write_byte(0);   message_end();   return;  } } public SamariModel(id) {  Weapon = read_data(2)    if((g_CTSamari == id || g_TSamari  == id) && ( Weapon == CSW_KNIFE))  {   set_pev( id, pev_viewmodel2,"models/v_samari.mdl");   cs_set_user_model(id,"ninja");   set_pev(id,pev_maxspeed,330.0);   return ;  } } public SamariDamage(id) {  new Samari_Damage = read_data( 2 ) + 55;  new AttackerID = get_user_attacker( id, Weapon );  new Float:fAHealth;  new Float:fVHealth ;    if((Weapon == CSW_KNIFE) && (AttackerID == g_CTSamari || AttackerID == g_TSamari ) && (is_user_connected(AttackerID)))  {   pev(AttackerID,pev_health, fAHealth);   pev(id,pev_health, fVHealth);   set_pev(AttackerID,pev_health, fAHealth + fVHealth );   pev(id,pev_origin,VictomOrigin);   pev(AttackerID,pev_origin,AttackerOrigin);     message_begin( MSG_BROADCAST, SVC_TEMPENTITY)   write_byte(8);   write_short(AttackerID);   write_short(id);   write_short(Lightning);   write_byte(0)   write_byte(0);   write_byte(25);   write_byte(30);   write_byte(10);     write_byte(255);   write_byte(255);   write_byte(255)   write_byte(255);   write_byte(0);   message_end();     if ((is_user_alive(id)) && (fVHealth < Samari_Damage))   {    pev(AttackerID, pev_frags, frags);    set_pev(AttackerID, pev_frags, ++frags);    dllfunc(DLLFunc_ClientKill, id);    return 1;   }  }  return 1; } public plugin_precache() {  precache_model("models/player/ninja/ninja.mdl");  precache_model("models/v_samari.mdl");  Lightning = precache_model("sprites/lgtning.spr");  sprite = precache_model("sprites/steam1.spr"); }

Last edited by The Specialist; 12-22-2006 at 02:43.
The Specialist is offline
Send a message via AIM to The Specialist
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:30.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode