Raised This Month: $ Target: $400
 0% 

Round Start Error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
The Specialist
BANNED
Join Date: Nov 2006
Old 12-21-2006 , 17:30   Re: Round Start Error
Reply With Quote #1

thats not the problem . The damage event worked on version 0.2 . I didnt change that .
The Specialist is offline
Send a message via AIM to The Specialist
P34nut
AMX Mod X Beta Tester
Join Date: Feb 2006
Location: Netherlands
Old 12-21-2006 , 17:34   Re: Round Start Error
Reply With Quote #2

first:
dont precache stuff in plugin_init()

i dont think itll precache it anyway (itll give a warning: Precaching not allowed)

instead of this: set_pev(id,pev_model,"models/ninja.mdl");
use engfunc(EngFunc_SetModel, id, "models/ninja.mdl"); but if id is a player you need to put ninja in the models/player directory and use cs_set_user_model() (for cs) or other native
__________________
All you need to change the world is one good lie and a river of blood

Last edited by P34nut; 12-21-2006 at 17:38.
P34nut is offline
The Specialist
BANNED
Join Date: Nov 2006
Old 12-21-2006 , 17:47   Re: Round Start Error
Reply With Quote #3

hi Peanut

the engfunc precache in the registery , does work , in fact I got that from Jim Yang .

As for the model , I tried that before , But it kills me right at the begining of the round , right as soon as I spawn , so it doesnt give it a chance to set the model , everyone dies .
The Specialist is offline
Send a message via AIM to The Specialist
P34nut
AMX Mod X Beta Tester
Join Date: Feb 2006
Location: Netherlands
Old 12-21-2006 , 18:03   Re: Round Start Error
Reply With Quote #4

Quote:
Originally Posted by The Specialist View Post
the engfunc precache in the registery , does work , in fact I got that from Jim Yang .
Dont do it its stupid.. precache need to be done at the very first point (mapload)
__________________
All you need to change the world is one good lie and a river of blood
P34nut is offline
The Specialist
BANNED
Join Date: Nov 2006
Old 12-21-2006 , 18:05   Re: Round Start Error
Reply With Quote #5

I like it that way though . I wonder why Jim Yang does it like that ?
Can you see why it kills everyone on round start ?
The Specialist is offline
Send a message via AIM to The Specialist
P34nut
AMX Mod X Beta Tester
Join Date: Feb 2006
Location: Netherlands
Old 12-21-2006 , 18:11   Re: Round Start Error
Reply With Quote #6

i cant find it so fast.. but there are sooooo many mistakes in that piece of code

examples:
missing { and } (a lot);
frags is a float;
ORIGIN IS A FLOAT (me and VEN already said that to you a few times);
precache in plugin_precache()


Fix this and ill look again
__________________
All you need to change the world is one good lie and a river of blood
P34nut is offline
The Specialist
BANNED
Join Date: Nov 2006
Old 12-21-2006 , 18:56   Re: Round Start Error
Reply With Quote #7

the reason I dont make origin a flaot is because it works when i did it as a interger . I ve never seen frags as a flaot .oops your right about frags just noticed that . let me add some brackets and see if the conditions
work .

Heres What I have now , but it doesnt set the player model .
Code:
#include <amxmodx> #include <fakemeta> new g_Switch; new g_TSamari; new g_CTSamari; new sprite; new origin[3]; new Lightning; new VictomOrigin[3]; new 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");   engfunc(EngFunc_SetModel,id,"models/player/ninja.mdl");   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.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-21-2006 at 20:01.
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