Description:
- I'm here with a new plugin which will block players from blocking things such as train, car, plane, door, etc..
Plugin was tested on public server.
- #include <zombie_escape>
- new const szEntities[][] =
- {
- "func_train",
- "func_vehicle",
- "func_tracktrain",
- "func_door"
- }
- public plugin_init()
- {
- register_plugin("No Block", "1.0", "Raheem")
- for (new i = 0; i < charsmax(szEntities); i++)
- {
- RegisterHam(Ham_Blocked, szEntities[i], "Fw_Blocked_Post", 1)
- }
- }
- public Fw_Blocked_Post(iEnt, id)
- {
- if (is_user_alive(id) && pev_valid(iEnt))
- {
- new Float:flVelocity[3]
- velocity_by_aim(id, 550, flVelocity)
- flVelocity[0] += 20.0
- flVelocity[1] += 20.0
- flVelocity[2] += 20.0
- set_entvar(id, var_velocity, flVelocity)
- }
- }