specbotid
Lehekülg 1, lehekülgi kokku 1 • Share
- Mystic_hunter
- Liitus : 28/07/2015
Postitusi : 73
Tere! kas keegi viitsib sma-failis muuta nii, et kui 2 mängijat liituvad, siis botid kaovad ära?
- Kood:
#include <amxmodx>
#include <cstrike>
#include <fakemeta>
#define VERSION "1.0"
new name_bot[] = "Reeglid leiad /reeglid";
new name_bot2[] = "Sms teenused /sms";
new name_bot3[] = "bot3";
new bool:bot_on, bot_id;
new bool:bot_on2, bot_id2;
new bool:bot_on3, bot_id3;
public plugin_init()
{
register_plugin("Spectator Bots", VERSION, "Elle Avant Tous");
bot_on=false;
bot_on2=false;
bot_on3=false;
bot_id=0;
bot_id2=0;
bot_id3=0;
set_task(1.4,"fake_make");
set_task(1.4,"fake_make2");
set_task(1.4,"fake_make3");
return PLUGIN_CONTINUE
}
public fake_make()
{
new rj[128];
if((!bot_on)&&(!bot_id))
{
bot_id=engfunc(EngFunc_CreateFakeClient,name_bot);
if(bot_id > 0)
{
engfunc(EngFunc_FreeEntPrivateData,bot_id);
dllfunc(DLLFunc_ClientConnect,bot_id,name_bot,"20.05.45.45.2",rj);
if(is_user_connected(bot_id))
{
dllfunc(DLLFunc_ClientPutInServer, bot_id);
set_pev(bot_id,pev_spawnflags,pev(bot_id,pev_spawnflags)|FL_FAKECLIENT);
set_pev(bot_id,pev_flags,pev(bot_id,pev_flags)|FL_FAKECLIENT);
cs_set_user_team(bot_id, CS_TEAM_SPECTATOR);
bot_on = true;
}
}
}
return PLUGIN_CONTINUE;
}
public fake_make2()
{
new rj[128];
if((!bot_on2)&&(!bot_id2))
{
bot_id2=engfunc(EngFunc_CreateFakeClient,name_bot2);
if(bot_id2 > 0)
{
engfunc(EngFunc_FreeEntPrivateData,bot_id2);
dllfunc(DLLFunc_ClientConnect,bot_id2,name_bot2,"20.05.45.45.2",rj);
if(is_user_connected(bot_id2))
{
dllfunc(DLLFunc_ClientPutInServer, bot_id2);
set_pev(bot_id2,pev_spawnflags,pev(bot_id2,pev_spawnflags)|FL_FAKECLIENT);
set_pev(bot_id2,pev_flags,pev(bot_id2,pev_flags)|FL_FAKECLIENT);
cs_set_user_team(bot_id2, CS_TEAM_SPECTATOR);
bot_on2 = true;
}
}
}
return PLUGIN_CONTINUE;
}
public fake_make3()
{
new rj[128];
if((!bot_on3)&&(!bot_id3))
{
bot_id3=engfunc(EngFunc_CreateFakeClient,name_bot3);
if(bot_id3 > 0)
{
engfunc(EngFunc_FreeEntPrivateData,bot_id3);
dllfunc(DLLFunc_ClientConnect,bot_id3,name_bot3,"20.05.45.45.2",rj);
if(is_user_connected(bot_id3))
{
dllfunc(DLLFunc_ClientPutInServer, bot_id3);
set_pev(bot_id3,pev_spawnflags,pev(bot_id3,pev_spawnflags)|FL_FAKECLIENT);
set_pev(bot_id3,pev_flags,pev(bot_id3,pev_flags)|FL_FAKECLIENT);
cs_set_user_team(bot_id3, CS_TEAM_SPECTATOR);
bot_on3 = true;
}
}
}
return PLUGIN_CONTINUE;
}
- Tonight
- Liitus : 19/02/2012
Postitusi : 18000
Ei viitsi muuta, sest sarnaseid pluginaid on väga palju juba. Kasuta seda: https://forums.alliedmods.net/showthread.php?p=254620
Vaata cvarid üle ofc.
Vaata cvarid üle ofc.
Soovid vestluses osaleda?
Selleks logi sisse või tee endale kasutaja.
Lehekülg 1, lehekülgi kokku 1
Permissions in this forum:
Sa ei saa vastata siinsetele teemadele