AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Block teleporter to terorrist (https://forums.alliedmods.net/showthread.php?t=236357)

wicho 03-03-2014 12:35

Block teleporter to terorrist
 
Hi everebody, well a friend create a map with some teleporters(trigger_teleport), well my question is how i can block this teleporter to terrorist only on this map with a code? i only want the antiterrorist can use it, can someone give and example pls?.. thx in advance

NiHiLaNTh 03-03-2014 13:46

Re: Block teleporter to terorrist
 
Try hooking Touch function and supercede;

Code:

register_touch("trigger_teleport", "player", "TeleportTouch");
......

public TeleportTouch(ent, id)
{
    if (cs_get_user_team(id) == CS_TEAM_T)
          return PLUGIN_HANDLED;

    return PLUGIN_CONTINUE;
}



All times are GMT -4. The time now is 06:03.

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