Raised This Month: $ Target: $400
 0% 

Comparing Origin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 07-06-2012 , 21:28   Re: Comparing Origin
Reply With Quote #7

I tried using IVecFVec to cast all arrays, but it still isn't working.

Here is all relevant code.
PHP Code:
new healthGain[33]        // [id - health gained]
new Float:healthOrigin[33][3]        // Origin for the health power
public client_connect(id)
{
    
powers[id] = PC_INVALID
    IVecFVec
({000}, healthOrigin[id])
}
public 
task_giveHealth(in[])
{
    new 
id str_to_num(in)
    
client_print(idprint_chat"Health Task....")
    new 
Float:now[3], Float:then[3], tmp[3]
    
get_user_origin(idtmp)
    
IVecFVec(tmphealthOrigin[id])
    
    if(!
healthOrigin[id][0])
    {
        for(new 
03i++)
            
healthOrigin[id][i] = now[i]
    }
        
        
    
then healthOrigin[id]
    if(
xs_vec_equal(nowthen) && healthGain[id] < 40)
    {
        
client_print(idprint_chat"Health Given")
        new 
health get_user_health(id) + 3
        set_user_health
(idhealth)
        
healthGain[id]+= 3
    
}
        
    
healthOrigin[id] = now

task_giveHealth IS called properly. (it prints "Health task...")
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz is offline
 



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 15:15.


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