Hello guys
I want to split this plugin to several plugins which consists of them !1) eurohl_bombmsg ( %s activated bomb! ==> Show message when user activated bomb in crossfire maps )Код:
public _trigger_multiple(const iEntity, const id)
{
new n = find_ent_by_target(-1,"fire_button_texture")
if (iEntity == n ) ////NUKEBUTTON
{
if (is_user_alive(id))
{
new msg[64]
get_pcvar_string(ehlBombMsg, msg, charsmax(msg))
//
if (msg[0]) // Check if is set bomb message
{
new name[32]
get_user_name(id, name, charsmax(name))
set_hudmessage(0, 255, 0, 0.75, 0.83, 0, 6.0, 10.0)
show_hudmessage(0, msg, name)
}
}
/*else
{
set_hudmessage(255, 0, 0, 0.65, 0.83, 0, 6.0, 10.0)
show_hudmessage(0, "Plugin by [eurohl]")
}*/
}
}
2) blueRoomCodes (3 shot lamp to open blue room )public lamp_check(iEntity, idattacker, Float:damage, Float:direction[3], traceresult, damagebits)
{
//If user shot lamp with gauss
if (is_user_alive(idattacker))
{
new weapon = get_user_weapon(idattacker)
if (weapon == HLW_GAUSS || weapon == HLW_GLOCK)
{
new id, body
get_user_aiming(idattacker, id, body, 600)
if (is_valid_ent(id)) //check if valid entity
{
new className[16]
entity_get_string(id,EV_SZ_classname,className,charsmax(className))
if (equal(className, LAMP_CLASS)) //check if entity is lamp class
{
if (weapon == HLW_GAUSS)
{
//Dont take damage from lamp bug
set_user_flags(idattacker, LAMP_ATTACK,1)
new params[1]
params[0] = idattacker
//Remove flag
set_task(2.0, "remove_flags", 0, params, 1)
//Warn about noob
lamp_warn(idattacker, damage)
}
else
{
if (secretDoorEnt)
{
if (!task_exists(816))
{
set_task(10.0, "resetcounter", 816)
}
if (blueRoomIndex >= CHEAT_IDS)
{
blueRoomIndex = 0
}
new globalName[16]
entity_get_string(id, EV_SZ_globalname, globalName, charsmax(globalName))
blueRoomCodes[blueRoomIndex] = globalName
blueRoomIndex++
//client_print(0,print_center, "%s %s %s %s", blueRoomCodes[0],
// blueRoomCodes[1], blueRoomCodes[2], blueRoomCodes[3])
for (new i = 0; i < CHEAT_IDS;i++)
{
if (!equal(blueRoomCodes[i],blueCheat[i]))
{
return PLUGIN_CONTINUE
}
}
resetcounter()
dllfunc(DLLFunc_Use, secretDoorEnt, id)
}
}
}
}
}
}
return PLUGIN_CONTINUE
}
public resetcounter()
{
blueRoomIndex = 0
for (new i = 0; i < CHEAT_IDS;i++)
{
blueRoomCodes[i] = ""
}
}
3) ham_strip_weapon ( takes a weapon from a player efficiently )Код:
stock ham_strip_weapon(id,weapon[])
{
if(!equal(weapon,"weapon_",7)) return 0;
new wId = get_weaponid(weapon);
if(!wId) return 0;
new wEnt;
while((wEnt = engfunc(EngFunc_FindEntityByString,wEnt,"classname",weapon)) && pev(wEnt,pev_owner) != id) {}
if(!wEnt) return 0;
if(get_user_weapon(id) == wId) ExecuteHamB(Ham_Weapon_RetireWeapon,wEnt);
if(!ExecuteHamB(Ham_RemovePlayerItem,id,wEnt)) return 0;
ExecuteHamB(Ham_Item_Kill,wEnt);
set_pev(id,pev_weapons,pev(id,pev_weapons) & ~(1<<wId));
return 1;
}
stock ESContains(const Input[][], InputLenCount, const StringToCompare[])
{
for (new i = 0;i<InputLenCount;i++)
{
if ( equal(Input[i],StringToCompare))
{
return 1
}
}
return 0
}
//+Trim text
stock Float:str_to_float2(text[])
{
trim(text)
return str_to_float(text)
}
/* Functions */
//split up result into lines
stock ExplodeString( Output[][], Max, Size, Input[], Delimiter )
{
new Idx, l = strlen(Input), Len;
do Len += (1 + copyc( Output[Idx], Size, Input[Len], Delimiter ));
while( (Len < l) && (++Idx < Max) )
return Idx;
}
4) door_block ( Fixed hornet gun blocking )Код:
public door_block(p, ent)
{
//Fixed hornet gun blocking
if (is_valid_ent(ent))
{
new class[32]
pev(ent,pev_classname,class,charsmax(class))
//
if (equal(class,"hornet"))
{
return HAM_SUPERCEDE
}
}
return HAM_IGNORED
}
Вложение:
eurohl1.7.rar [14.06 КБ]
Скачиваний: 189