Raised This Month: $ Target: $400
 0% 

Spawning fakeclient crashes server


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 04-27-2007 , 09:05   Re: Spawning fakeclient crashes server
Reply With Quote #9

From Dajrokan's kz_dajrokan.sma:

Code:
public mi_bot_connect() {

    if (!bot_id) {
        bot_id = engfunc(EngFunc_CreateFakeClient, BOT_NAME)
        new ptr[128]
        dllfunc(DLLFunc_ClientConnect, bot_id, BOT_NAME, "127.0.0.1", ptr)
        dllfunc(DLLFunc_ClientPutInServer, bot_id)
        cs_set_user_team(bot_id, CS_TEAM_CT, CS_CT_URBAN)
        dllfunc(DLLFunc_Spawn, bot_id)
        set_pev(bot_id, pev_effects, (pev(bot_id, pev_effects) | 128))
        set_pev(bot_id, pev_solid, 0)
        bot_userid = get_user_userid(bot_id)
        set_user_origin(bot_id, origo)
    }

    return PLUGIN_CONTINUE
}

public mi_bot_disconnect() {

    if (bot_id) {
        bot_id = 0
        server_cmd("kick #%d", bot_userid)
    }

    return PLUGIN_CONTINUE
}
Hope that helps!?

greetz regalis
__________________

Last edited by regalis; 04-27-2007 at 20:20. Reason: edited my edits *gg*
regalis 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 06:33.


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