Raised This Month: $ Target: $400
 0% 

Array Operations


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
S34Qu4K3
Veteran Member
Join Date: Jan 2010
Location: Galicia
Old 10-09-2010 , 12:09   Array Operations
Reply With Quote #1

Hi I have this

PHP Code:
new Password[4]
new 
szArg[192]

//.........


public RegisterPassword(id)
{
    
client_cmd(id"messagemode Register_Pwd")
    
    
client_print(idprint_center"Write Password  Numbers")
    
set_hudmessage(255000.00.000.14.00.010.01, -1)
    
ShowSyncHudMsg(idg_MsgSync"^n^n^n  Write Password  Numbers")
    
    return 
PLUGIN_CONTINUE;
}

public 
Pwd_register(id)
{
    
read_argsszArg191 )
    
remove_quotesszArg )
    
trim szArg )
    
    if( !
isdigit(szArg[0]) )
    {
        
RegisterPassword(id)
        return 
PLUGIN_HANDLED;
    }
        
    
copyPassword[id], charsmaxPassword[] ), szArg )
    
    
client_printidprint_chat"Tu password es: %s"Password[id] )
    
CheckValidPassword(id)
    return 
PLUGIN_CONTINUE;
    
}  
public 
CheckValidPassword(id)
{
    
client_print(idprint_chat"[DEBUG]public CheckValidPassword")
    if((
Password[0]*Password[3])-(Password[1]*Password[2]) == 1)
    {
        
client_print(idprint_chat"[DEBUG]Password Acepted")
        
InverseArray(id)
    }
    else
    {
        
client_print(idprint_chat"[DEBUG]Array Determinant Not 1")
        
RegisterPassword(id)
    }

When the player write 4 numbers for the array Password, i want to check if the determinat of the array is 1 but when i put my four numbers, the plugin say that the determinat of the array is not 1. Why?
__________________

- ASM2SMA: Experimental AMXX Assembly encoder

- Defuse Bar Fix

Quote:
Originally Posted by Arkshine
I DON'T WANT TO SEE NOOOOOOOOOOOOOOO AHHHHH. MY EYES ARE ALREADY HURT.
S34Qu4K3 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 10:17.


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