Raised This Month: $51 Target: $400
 12% 

Modern warfare 2 Mod v1.3.6b


Post New Thread Reply   
 
Thread Tools Display Modes
wickedd
Veteran Member
Join Date: Nov 2009
Old 09-11-2011 , 15:57   Re: Modern warfare 2 Mod v1.2.0b
Reply With Quote #91

I just tried to use sqlvault and I got this error

Code:
[AMXX] Plugin ("cod_mw2_mod.amxx") is setting itself as failed.
[AMXX] Plugin says: Error opening nVault
[AMXX] Run time error 1 (plugin "cod_mw2_mod.amxx") - forced exit
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.

Last edited by wickedd; 09-11-2011 at 16:17.
wickedd is offline
modernwarfare
Senior Member
Join Date: Aug 2011
Location: sweden
Old 09-11-2011 , 16:49   Re: Modern warfare 2 Mod v1.2.0b
Reply With Quote #92

Code:
#include <sqlx>

new Host[]     = ""
new User[]    = ""
new Pass[]     = ""
new Db[]     = ""
new Handle:g_SqlTuple
new g_Error[512]


public plugin_init()
{
    set_task(1.0, "MySql_Init");
}

public MySql_Init()
{
    g_SqlTuple = SQL_MakeDbTuple(Host,User,Pass,Db)
    
    new ErrorCode,Handle:SqlConnection = SQL_Connect(g_SqlTuple,ErrorCode,g_Error,charsmax(g_Error))
    if(SqlConnection == Empty_Handle)
    {
        set_fail_state(g_Error)
    }
    new Handle:Queries
    Queries = SQL_PrepareQuery(SqlConnection,"CREATE TABLE IF NOT EXISTS mw2 (steamid varchar(32), rank TEXT(11), points INT(11), class INT(11))")
    
    if(!SQL_Execute(Queries))
    {
        SQL_QueryError(Queries,g_Error,charsmax(g_Error))
        set_fail_state(g_Error)   
    }
    
    SQL_FreeHandle(Queries)
    SQL_FreeHandle(SqlConnection)   
}

public plugin_end()
{
    SQL_FreeHandle(g_SqlTuple)
}

public LoadData(id)
{
    new ErrorCode,Handle:SqlConnection = SQL_Connect(g_SqlTuple,ErrorCode,g_Error,charsmax(g_Error))
    
    if(g_SqlTuple == Empty_Handle)
        set_fail_state(g_Error)
        
    new szSteamId[32], szTemp[512]
    get_user_authid(id, szSteamId, charsmax(szSteamId))
    
    new Data[1]
    Data[0] = id

    format(szTemp,charsmax(szTemp),"SELECT * FROM `mw2` WHERE (`mw2`.`steamid` = '%s')", szSteamId)
    SQL_ThreadQuery(g_SqlTuple,"register_client",szTemp,Data,1)
    SQL_FreeHandle(SqlConnection)
}

public register_client(FailState,Handle:Query,Error[],Errcode,Data[],DataSize)
{
    if(FailState == TQUERY_CONNECT_FAILED)
    {
        log_amx("Load - Could not connect to SQL database.  [%d] %s", Errcode, Error)
    }
    else if(FailState == TQUERY_QUERY_FAILED)
    {
        log_amx("Load Query failed. [%d] %s", Errcode, Error)
    }
    new id = Data[0]
    
    if(SQL_NumResults(Query) < 1)
    {
        
        new szSteamId[32]
        get_user_authid(id, szSteamId, charsmax(szSteamId))
        
        if (equal(szSteamId,"ID_PENDING"))
            return PLUGIN_HANDLED;
            
        new szTemp[512]
        
        new ErrorCode,Handle:SqlConnection = SQL_Connect(g_SqlTuple,ErrorCode,g_Error,charsmax(g_Error))
        if(g_SqlTuple == Empty_Handle)
            set_fail_state(g_Error)

        format(szTemp,charsmax(szTemp),"INSERT INTO `mw2`(`steamid`, `rank`, `points`, `class`) VALUES ('%s', '0', '0', '0')", szSteamId)
        SQL_ThreadQuery(g_SqlTuple,"IgnoreHandle",szTemp)
        server_print("seach information ")
        SQL_FreeHandle(SqlConnection)
    } 
    else 
    {

        player_rank[id] = SQL_ReadResult(Query, 1)
        player_points[id] = SQL_ReadResult(Query, 2)
        player_class[id] = SQL_ReadResult(Query, 3)
        server_print("read the result ")
    }
    return PLUGIN_CONTINUE;
}  


public IgnoreHandle(FailState,Handle:Query,Error[],Errcode,Data[],DataSize)
{
    SQL_FreeHandle(Query)
    return PLUGIN_HANDLED;
}

public SaveData(id)
{
    new ErrorCode,Handle:SqlConnection = SQL_Connect(g_SqlTuple,ErrorCode,g_Error,511)
    if(g_SqlTuple == Empty_Handle)
        set_fail_state(g_Error)
   
    new szSteamId[32], szTemp[512]
    get_user_authid(id, szSteamId, charsmax(szSteamId))
    
    format(szTemp,charsmax(szTemp),"UPDATE `mw2` SET `rank` = '%d' , `points` = '%d' , `class` = '%d' WHERE `mw2`.`steamid` = '%s';", player_rank[id],  player_points[id], player_class[id], szSteamId) 
    SQL_ThreadQuery(g_SqlTuple,"IgnoreHandle",szTemp)
    SQL_FreeHandle(SqlConnection);
}
here i made this code it uses sqlx

i hope you add it
__________________
Im supporting/coding XP Mod Plugin
Free Palestine
R.I.P. The 2967 American people that lost their lives 9/11 and R.I.P.
The 48,644 Afghan and 1,690,903 Iraqi people that paid the ultimate price for a crime they did not commit.



modernwarfare is offline
Send a message via MSN to modernwarfare Send a message via Skype™ to modernwarfare
D.Moder
I uploaded 2 great gameplay plugins here
Join Date: Sep 2009
Location: Sin city
Old 09-11-2011 , 17:38   Re: Modern warfare 2 Mod v1.2.0b
Reply With Quote #93

disable the XACCURATE feature
//#define XACCURATE
__________________
Creator of COD-Life (Half COD, Half Life)
https://forums.alliedmods.net/showthread.php?t=261162
twitter: @D_Moder_61216
D.Moder is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 09-11-2011 , 18:13   Re: Modern warfare 2 Mod v1.2.0b
Reply With Quote #94

Quote:
Originally Posted by wickedd View Post
I just tried to use sqlvault and I got this error

Code:
[AMXX] Plugin ("cod_mw2_mod.amxx") is setting itself as failed.
[AMXX] Plugin says: Error opening nVault
[AMXX] Run time error 1 (plugin "cod_mw2_mod.amxx") - forced exit
Quote:
Originally Posted by D.Moder View Post
disable the XACCURATE feature
//#define XACCURATE
I'm getting the same error:
Code:
[AMXX] Plugin ("cod_mw2_mod.amxx") is setting itself as failed.
[AMXX] Plugin says: Error opening nVault
[AMXX] Run time error 1 (plugin "cod_mw2_mod.amxx") - forced exit
Also when I'm playing map de_dust and I jump from the sniper nest the game will freeze.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
D.Moder
I uploaded 2 great gameplay plugins here
Join Date: Sep 2009
Location: Sin city
Old 09-11-2011 , 19:48   Re: Modern warfare 2 Mod v1.2.0b
Reply With Quote #95

I'm closing/removing this, there is some error that crashes the server and I can't find it because it just suddenly closes the server window, and I can't see the error.
I do want to continue, but I'm just stuck.

*** remove this plugin ***
__________________
Creator of COD-Life (Half COD, Half Life)
https://forums.alliedmods.net/showthread.php?t=261162
twitter: @D_Moder_61216
D.Moder is offline
mattisbogus
Senior Member
Join Date: Jun 2009
Location: North Carolina, USA
Old 09-11-2011 , 22:04   Re: Modern warfare 2 Mod v1.2.0b (delete this)
Reply With Quote #96

ahh man that sucks but i am glad it wasn't just me. I could never run very long without the server crashing. Sometimes it would say because mp.dll other times because fakemeta_amx.dll and sometimes just unknown. I even stripped the server of scavenger/health packs, grenaded launchers, semtex/frags, and even tried different methods of stripping weapons and respawning and still it would eventually crash without an error. Shame man you did an excellent job

Last edited by mattisbogus; 09-11-2011 at 22:12. Reason: damn phone!
mattisbogus is offline
D.Moder
I uploaded 2 great gameplay plugins here
Join Date: Sep 2009
Location: Sin city
Old 09-11-2011 , 22:43   Re: Modern warfare 2 Mod v1.2.0b (delete this)
Reply With Quote #97

@mattisbogus
thanks man
now the only people who can save this mod from going down, is the amx moderators/plugin approvers.
I'm pretty sure it's just 1 freaking function/stock is messing it up, but I have over 100 functions in there!
__________________
Creator of COD-Life (Half COD, Half Life)
https://forums.alliedmods.net/showthread.php?t=261162
twitter: @D_Moder_61216
D.Moder is offline
modernwarfare
Senior Member
Join Date: Aug 2011
Location: sweden
Old 09-11-2011 , 23:56   Re: Modern warfare 2 Mod v1.2.0b
Reply With Quote #98

Quote:
Originally Posted by D.Moder View Post
I'm closing/removing this, there is some error that crashes the server and I can't find it because it just suddenly closes the server window, and I can't see the error.
I do want to continue, but I'm just stuck.

*** remove this plugin ***
that was too fast


i started my xp mod before you but you quit your plugin before me
__________________
Im supporting/coding XP Mod Plugin
Free Palestine
R.I.P. The 2967 American people that lost their lives 9/11 and R.I.P.
The 48,644 Afghan and 1,690,903 Iraqi people that paid the ultimate price for a crime they did not commit.



modernwarfare is offline
Send a message via MSN to modernwarfare Send a message via Skype™ to modernwarfare
wickedd
Veteran Member
Join Date: Nov 2009
Old 09-12-2011 , 00:03   Re: Modern warfare 2 Mod v1.2.0b (delete this)
Reply With Quote #99

I think he started his plugin before you. He wrote his plugin, you copied and paste yours, that's a big difference.

@D.Moder

Don't give up. It's a good plugin, just has a few bugs.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.

Last edited by wickedd; 09-12-2011 at 00:06.
wickedd is offline
modernwarfare
Senior Member
Join Date: Aug 2011
Location: sweden
Old 09-12-2011 , 00:06   Re: Modern warfare 2 Mod v1.2.0b (delete this)
Reply With Quote #100

Quote:
Originally Posted by wickedd View Post
I think he started his mod before you. He wrote his mod, you copied and paste yours, that's a big difference.

@D.Moder

Don't give up. It's a good plugin, just has a few bugs.

hahhaha nub you cant even do better?


And dont worry i rewrote the codes

so take that
__________________
Im supporting/coding XP Mod Plugin
Free Palestine
R.I.P. The 2967 American people that lost their lives 9/11 and R.I.P.
The 48,644 Afghan and 1,690,903 Iraqi people that paid the ultimate price for a crime they did not commit.



modernwarfare is offline
Send a message via MSN to modernwarfare Send a message via Skype™ to modernwarfare
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 22:53.


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