Raised This Month: $ Target: $400
 0% 

need help get


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Zaser
Member
Join Date: Jan 2005
Old 02-21-2006 , 04:07   need help get
Reply With Quote #1

i get this error


// D:\scripting\carmod.sma(44 : error 021: symbol already defined: "client_Pre
Think"
//
// 1 Error.
// Could not locate output file D:\scripting\compiled\carmod.amx (compile failed
).
//
// Compilation Time: 1,3 sec
// ----------------------------------------




Code:
public client_PreThink(id) 
    { 
    if(incar[id] != 0) 
        { 
        new bufferstop = entity_get_int(id,EV_INT_button) 
         
        if(bufferstop != 0) { 
            entity_set_int(id,EV_INT_button,bufferstop & ~IN_ATTACK & ~IN_ATTACK2 & ~IN_ALT1 & ~IN_USE) 
        } 
         
        if((bufferstop & IN_JUMP) && (entity_get_int(id,EV_INT_flags) & ~FL_ONGROUND & ~FL_DUCKING)) { 
            entity_set_int(id,EV_INT_button,entity_get_int(id,EV_INT_button) & ~IN_JUMP) 
        } 
        return PLUGIN_CONTINUE 
    } 
    return PLUGIN_HANDLED
} 
----------


public client_PreThink(id) {
 
    if(incar[id]) 
    { 
        new Float:VecVel[3],Float:VecAngles[3]; 
        entity_get_vector(id,EV_VEC_velocity,VecVel); 
        entity_get_vector(id,EV_VEC_v_angle,VecAngles); 

        VecVel[0] = floatcos(VecAngles[1],degrees) * 800.0; 
        VecVel[1] = floatsin(VecAngles[1],degrees) * 800.0; 

        entity_set_vector(id,EV_VEC_velocity,VecVel); 
     
  } 
    return PLUGIN_HANDLED
}
how can i fix this?
Zaser is offline
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 02-21-2006 , 04:11  
Reply With Quote #2

Code:
public client_PreThink(id) {     if(incar[id] != 0)     {         new bufferstop = entity_get_int(id,EV_INT_button)                   if(bufferstop != 0) {             entity_set_int(id,EV_INT_button,bufferstop & ~IN_ATTACK & ~IN_ATTACK2 & ~IN_ALT1 & ~IN_USE)         }                   if((bufferstop & IN_JUMP) && (entity_get_int(id,EV_INT_flags) & ~FL_ONGROUND & ~FL_DUCKING)) {             entity_set_int(id,EV_INT_button,entity_get_int(id,EV_INT_button) & ~IN_JUMP)         }     }         if(incar[id])     {         new Float:VecVel[3],Float:VecAngles[3];         entity_get_vector(id,EV_VEC_velocity,VecVel);         entity_get_vector(id,EV_VEC_v_angle,VecAngles);         VecVel[0] = floatcos(VecAngles[1],degrees) * 800.0;         VecVel[1] = floatsin(VecAngles[1],degrees) * 800.0;         entity_set_vector(id,EV_VEC_velocity,VecVel);     } }

And you got hit by the OLO ulgy code structure ^_^

PS. You can't do that twice public Client_Prethink and public Client_PreThink twice like that
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
Charr
Senior Member
Join Date: Jul 2005
Location: Long Island, New York, U
Old 02-21-2006 , 08:02  
Reply With Quote #3

This would work too
Code:
 public client_PreThink(id) {     if(incar[id])     {         new bufferstop = entity_get_int(id,EV_INT_button)                   if(bufferstop != 0) {             entity_set_int(id,EV_INT_button,bufferstop & ~IN_ATTACK & ~IN_ATTACK2 & ~IN_ALT1 & ~IN_USE & ~IN_ALT2 & ~IN_JUMP)         }         new Float:VecVel[3],Float:VecAngles[3];         entity_get_vector(id,EV_VEC_velocity,VecVel);         entity_get_vector(id,EV_VEC_v_angle,VecAngles);         VecVel[0] = floatcos(VecAngles[1],degrees) * 800.0;         VecVel[1] = floatsin(VecAngles[1],degrees) * 800.0;         entity_set_vector(id,EV_VEC_velocity,VecVel);     } }

If you move too slow for the carmod, increase the 800.0.
__________________
Charr is offline
Send a message via AIM to Charr Send a message via MSN to Charr
ng1200
Member
Join Date: May 2005
Old 02-21-2006 , 08:03  
Reply With Quote #4

Quote:
Originally Posted by Charr
This would work too
Code:
 public client_PreThink(id) {     if(incar[id])     {         new bufferstop = entity_get_int(id,EV_INT_button)                   if(bufferstop != 0) {             entity_set_int(id,EV_INT_button,bufferstop & ~IN_ATTACK & ~IN_ATTACK2 & ~IN_ALT1 & ~IN_USE & ~IN_ALT2 & ~IN_JUMP)         }         new Float:VecVel[3],Float:VecAngles[3];         entity_get_vector(id,EV_VEC_velocity,VecVel);         entity_get_vector(id,EV_VEC_v_angle,VecAngles);         VecVel[0] = floatcos(VecAngles[1],degrees) * 800.0;         VecVel[1] = floatsin(VecAngles[1],degrees) * 800.0;         entity_set_vector(id,EV_VEC_velocity,VecVel);     } }

If you move too slow for the carmod, increase the 800.0.
the problem with this code is that u cant stop.
ng1200 is offline
Charr
Senior Member
Join Date: Jul 2005
Location: Long Island, New York, U
Old 02-21-2006 , 08:06  
Reply With Quote #5

I used the same code for other reasons, and you should be able to slow down. What else does the code do?
__________________
Charr is offline
Send a message via AIM to Charr Send a message via MSN to Charr
Zaser
Member
Join Date: Jan 2005
Old 02-23-2006 , 08:28  
Reply With Quote #6

boys is there any one i can pm my script to becuse now it drive all the time it cant be stoped and i just want it to run when you press walk keys
Zaser is offline
Reply


Thread Tools
Display Modes

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 20:18.


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