Raised This Month: $51 Target: $400
 12% 

[L4D2] Car Alarm Informer V3 ( 2023/10/26 )


Post New Thread Reply   
 
Thread Tools Display Modes
Author
eyal282
Veteran Member
Join Date: Aug 2011
Plugin ID:
5998
Plugin Version:
3.0
Plugin Category:
General Purpose
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Informs all players who on earth is dumb enough to trigger the car alarm
    Old 01-20-2018 , 16:09   [L4D2] Car Alarm Informer V3 ( 2023/10/26 )
    Reply With Quote #1

    No cvars or something.

    Also has a global forward for my RPG. Downloading this plugin with my RPG will spawn a tank with a chance when an alarm trips.

    Previous view count: 2077
    Attached Files
    File Type: sp Get Plugin or Get Source (AlarmInformer.sp - 50 views - 1.9 KB)
    __________________
    I am available to make plugins for pay.

    Discord: Eyal282#1334

    Last edited by eyal282; 10-26-2023 at 04:29.
    eyal282 is offline
    Emilio3
    Member
    Join Date: Aug 2013
    Location: London UK
    Old 01-22-2018 , 14:44   Re: [L4D2] Car Alarm Informer V2.0
    Reply With Quote #2

    https://forums.alliedmods.net/showthread.php?t=225388 is the some
    PHP Code:
    #define PLUGIN_VERSION "1.0"

    #pragma semicolon 1

    #include <sourcemod>

    public Plugin:myinfo =
    {
        
    name "[L4D2] Car Alarm Notify",
        
    author "raziEiL [disawar1]",
        
    description "",
        
    version PLUGIN_VERSION,
        
    url "http://steamcommunity.com/id/raziEiL"
    }

    static 
    g_iAlarmCarClient;

    public 
    OnPluginStart()
    {
        
    HookEvent("create_panic_event"event_PanicEvent);
        
    HookEvent("triggered_car_alarm"event_CarAlarmEventHookMode_PostNoCopy);
    }

    public 
    Action:event_PanicEvent(Handle:event, const String:name[], bool:dontBroadcast)
    {
        
    g_iAlarmCarClient GetClientOfUserId(GetEventInt(event"userid"));
        
    CreateTimer(0.5Clearg_iAlarmCarClient);
    }

    public 
    Action:Clear(Handle:timerg_iAlarmCarClient 0;

    public 
    Action:event_CarAlarm(Handle:event, const String:name[], bool:dontBroadcast)
    {
        if (
    g_iAlarmCarClient && IsClientInGame(g_iAlarmCarClient) && GetClientTeam(g_iAlarmCarClient) == 2){

            
    PrintToChatAll("Car Alarm Triggered by %N"g_iAlarmCarClient);
            
    g_iAlarmCarClient 0;
        }


    Last edited by Emilio3; 01-22-2018 at 14:46.
    Emilio3 is offline
    Psyk0tik
    Veteran Member
    Join Date: May 2012
    Location: Homeless
    Old 01-22-2018 , 18:12   Re: [L4D2] Car Alarm Informer V2.0
    Reply With Quote #3

    The plugin that you linked was disapproved because the author didn't even provide a plugin in that post...
    __________________
    Psyk0tik is offline
    Lux
    Veteran Member
    Join Date: Jan 2015
    Location: Cat
    Old 01-22-2018 , 21:22   Re: [L4D2] Car Alarm Informer V2.0
    Reply With Quote #4

    Why not do a director hint, like it shows you in l4d1

    here is my stock for showing specific client a director hint.
    You should use it in a forloop.

    PHP Code:
    DirectorHint(iClient, const Float:fHintTime=5.0, const String:sHintIcon[]="icon_alert", const String:sHintCaption[]="Print to me baby", const String:sHintColour[]="100 100 100")
    {
        static 
    iEntity;
        
    iEntity CreateEntityByName("env_instructor_hint");
        if(
    iEntity 1)
            return;
        
        static 
    String:sValues[72];
        
    FormatEx(sValuessizeof(sValues), "hint%d"iClient);
        
    DispatchKeyValue(iClient"targetname"sValues);
        
    DispatchKeyValue(iEntity"hint_target"sValues);
        
        
    DispatchKeyValue(iEntity"hint_range""100");
        
    DispatchKeyValue(iEntity"hint_icon_onscreen"sHintIcon);
        
        
    FormatEx(sValuessizeof(sValues), "%f"fHintTime);
        
    DispatchKeyValue(iEntity"hint_timeout"sValues);
        
        
    FormatEx(sValuessizeof(sValues), "%s"sHintCaption);
        
    DispatchKeyValue(iEntity"hint_caption"sValues);
        
    DispatchKeyValue(iEntity"hint_color"sHintColour);
        
    DispatchSpawn(iEntity);
        
    AcceptEntityInput(iEntity"ShowHint"iClient);
        
        
    FormatEx(sValuessizeof(sValues), "OnUser1 !self:Kill::%f:1"fHintTime);
        
    SetVariantString(sValues);
        
    AcceptEntityInput(iEntity"AddOutput");
        
    AcceptEntityInput(iEntity"FireUser1");

    __________________
    Connect
    My Plugins: KlickME
    [My GitHub]

    Commission me for L4D
    Lux is offline
    eyal282
    Veteran Member
    Join Date: Aug 2011
    Old 01-23-2018 , 02:37   Re: [L4D2] Car Alarm Informer V2.0
    Reply With Quote #5

    Quote:
    Originally Posted by Emilio3 View Post
    https://forums.alliedmods.net/showthread.php?t=225388 is the some
    PHP Code:
    #define PLUGIN_VERSION "1.0"

    #pragma semicolon 1

    #include <sourcemod>

    public Plugin:myinfo =
    {
        
    name "[L4D2] Car Alarm Notify",
        
    author "raziEiL [disawar1]",
        
    description "",
        
    version PLUGIN_VERSION,
        
    url "http://steamcommunity.com/id/raziEiL"
    }

    static 
    g_iAlarmCarClient;

    public 
    OnPluginStart()
    {
        
    HookEvent("create_panic_event"event_PanicEvent);
        
    HookEvent("triggered_car_alarm"event_CarAlarmEventHookMode_PostNoCopy);
    }

    public 
    Action:event_PanicEvent(Handle:event, const String:name[], bool:dontBroadcast)
    {
        
    g_iAlarmCarClient GetClientOfUserId(GetEventInt(event"userid"));
        
    CreateTimer(0.5Clearg_iAlarmCarClient);
    }

    public 
    Action:Clear(Handle:timerg_iAlarmCarClient 0;

    public 
    Action:event_CarAlarm(Handle:event, const String:name[], bool:dontBroadcast)
    {
        if (
    g_iAlarmCarClient && IsClientInGame(g_iAlarmCarClient) && GetClientTeam(g_iAlarmCarClient) == 2){

            
    PrintToChatAll("Car Alarm Triggered by %N"g_iAlarmCarClient);
            
    g_iAlarmCarClient 0;
        }

    Mine looks a bit more efficient and if someone ever decides to go insane and allow 2 car alarms to trigger, no bugs will occur.
    __________________
    I am available to make plugins for pay.

    Discord: Eyal282#1334
    eyal282 is offline
    ZzZombo
    Member
    Join Date: May 2012
    Location: Ravenholm
    Old 05-03-2022 , 12:17   Re: [L4D2] Car Alarm Informer V2.0
    Reply With Quote #6

    Please make the message localized. Thanks!
    ZzZombo is offline
    Reply



    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 23:47.


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