Raised This Month: $ Target: $400
 0% 

Script corrections:


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kmal2t
BANNED
Join Date: Apr 2006
Old 05-15-2007 , 15:44   Script corrections:
Reply With Quote #1

brawrr

Last edited by kmal2t; 05-21-2007 at 04:17.
kmal2t is offline
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 05-15-2007 , 16:51   Re: Script corrections:
Reply With Quote #2

For problem 1 i have a solution...

Code:
public event_Touch(pTouched, pToucher)
{
    new classTouched[32];
    new classToucher[32];
    
    // Get the Classname from the touched entity and the toucher
    pev(pTouched, pev_classname, classTouched, 31);
    pev(pToucher, pev_classname, classToucher, 31);
    
    
    // Check if Touched is a blubbb and the Toucher is alive
    if(!is_user_alive(pToucher)) return PLUGIN_CONTINUE;    
    if(!equal(classTouched, "func_breakable")) return PLUGIN_CONTINUE; // here you check what classname the touched have

    // A Player has touched a func_breakable
    // do something
    
    return PLUGIN_CONTINUE;
}
Problem 2 : no idea..0o

And Problem 3: is there a question? (your code seems to work)
__________________
regalis is offline
pRED*
Join Date: Dec 2006
Old 05-15-2007 , 17:09   Re: Script corrections:
Reply With Quote #3

Code:
public bhop(id, level, cid) {     /*turning plugin on or off */     new cmd[32]     read_argv(1, cmd, 31)     remove_quotes(cmd)     if(equali(cmd, "pass1") ) {     /* if they don't have amx_12345 "pass1" its off */         bhopon = true;             }     else {         bhopon = false;         } }

Should fix 3..
You were reading argv 0 (the original command). Argv 1 is the first additional parameter (the password in your case)

And I think I've partially got number 2. Not really sure if this stock is the easiest way to go. Will think about it later

Code:
public SetJumpDistance(id) {         new Float:JumpDistance = tuna formula         new Float:fOrigin[3],Float:fSpeed,Float:fvelocity[3]         pev(id,pev_speed,fSpeed)     //Fine the origin of a poiny JumpDistance away from you (umm.. forgotten..)     velocity_to_point(id, fOrigin, fSpeed, fVelocity)     set_pev(id,pev_velocity,fVelocity) }   /* p34nut's stock */ stock velocity_to_point(id, Float:fOrigin[3], Float:fSpeed, Float:fVelocity[3]) {         if (!is_user_connected(id))         return 0;       static Float:fUserOrigin[3], Float:fDist;         pev(id, pev_origin, fUserOrigin);           fDist = vector_distance(fOrigin, fUserOrigin);       fVelocity[0] = (fOrigin[0] - fUserOrigin[0]) * (2.0 * fSpeed) / fDist;     fVelocity[1] = (fOrigin[1] - fUserOrigin[1]) * (2.0 * fSpeed) / fDist;     fVelocity[2] = (fOrigin[2] - fUserOrigin[2]) * (2.0 * fSpeed) / fDist;     return 1; }
pRED* is offline
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 10:30.


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