Raised This Month: $32 Target: $400
 8% 

[code] infinity loop


Post New Thread Reply   
 
Thread Tools Display Modes
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 12-21-2016 , 02:54   Re: [code] infinity loop
Reply With Quote #21

Look )
something like this:

I have just to add the unique numbers founded in an array and get more randomized if they are in:
PHP Code:
#include <amxmodx>
#include <nvault>


new UniqueNumber;
new 
gVault;
new const 
KeyVault[] = "CURRENT";
new 
Max 1999999999;

public 
plugin_init( )
{
    
gVault nvault_open"Uniq_numbervlt" );

    if( 
gVault == INVALID_HANDLE )
    {
        
set_fail_state"Problems oppenning Uniq_number_vlt.vault file!" );
    }

    
UniqueNumber randomnvault_getgVaultKeyVault ) / 40 10 90 20 40 );

    
register_clcmd"say /test" "test" );
    
register_clcmd"say /cur" "cur" );
}


public 
testid )
{
    
client_printid print_chat"Unique Number: %i"Generate() );
}

public 
curid )
{
    
client_printid print_chat"The cur uniq numb: %i"UniqueNumber );
}


public 
Generate( )
{
    new 
iReturned nvault_getgVault KeyVault ), szData[11];

    if( 
iReturned )
        
UniqueNumber iReturned++;
    else
        
UniqueNumber 1;

    
num_to_striReturned >= Max randomiReturned 40 20 30 70 10 ), szDatacharsmaxszData ) );

    
nvault_setgVaultKeyVaultszData );

    return 
UniqueNumber randomUniqueNumber 12 13 20 );

}

public 
plugin_end( )
{
    
nvault_closegVault );

))
__________________
Project: Among Us
Craxor is offline
Send a message via ICQ to Craxor
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-21-2016 , 07:23   Re: [code] infinity loop
Reply With Quote #22

My answer still holds true.
__________________
HamletEagle is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 12-21-2016 , 08:19   Re: [code] infinity loop
Reply With Quote #23

Quote:
Originally Posted by HamletEagle View Post
My answer still holds true.
agree with you
__________________
Project: Among Us
Craxor is offline
Send a message via ICQ to Craxor
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:53.


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