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

[L4D2] Who called the horde?


Post New Thread Reply   
 
Thread Tools Display Modes
Skorpion1976
Veteran Member
Join Date: Jun 2009
Location: Austria
Old 11-18-2010 , 12:09   Re: [L4D2] Who called the horde?
Reply With Quote #11

#include <sourcemod>
instead of
#include < sourcemod > maybe? Is it the spaces ?
Skorpion1976 is offline
Skorpion1976
Veteran Member
Join Date: Jun 2009
Location: Austria
Old 11-19-2010 , 04:31   Re: [L4D2] Who called the horde?
Reply With Quote #12

It compiles, just one warning about tag mismatch in this line:
Code:
GetClientName(id, szName, MAX_NAME_LENGTH - 1);
Attached Files
File Type: sp Get Plugin or Get Source (who_panic.sp - 315 views - 547 Bytes)
Skorpion1976 is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 11-19-2010 , 05:58   Re: [L4D2] Who called the horde?
Reply With Quote #13

Replace:
PHP Code:
new szNameMAX_NAME_LENGTH ]; 
With:
PHP Code:
new String:szNameMAX_NAME_LENGTH ]; 
Also maybe use decl instead of new... http://wiki.alliedmods.net/Introduct...ourcePawn#decl
__________________
Silvers is offline
danielmyst777
AlliedModders Donor
Join Date: Aug 2010
Location: Virginia
Old 11-26-2010 , 11:14   Re: [L4D2] Who called the horde?
Reply With Quote #14

@Skorpion1976

The plug-in you compiled will not load in sourcemod under L4D2.

@xPaw

Your updated code for the plug-in still gives the same "spaces" error while trying to compile it.
__________________
danielmyst777 is offline
Skorpion1976
Veteran Member
Join Date: Jun 2009
Location: Austria
Old 11-27-2010 , 19:09   Re: [L4D2] Who called the horde?
Reply With Quote #15

I can compile it and the server loads it properly. I have no clue what you´re doing. But however I do get a "client index 0...." error now so I can´t use it.
Skorpion1976 is offline
mentor
Member
Join Date: Apr 2011
Old 05-19-2011 , 05:30   Re: [L4D2] Who called the horde?
Reply With Quote #16

this plugin can set announces for alarm of car only?
mentor is offline
replay_84
Senior Member
Join Date: Jun 2021
Old 11-23-2022 , 15:54   Re: [L4D2] Who called the horde?
Reply With Quote #17

Someone knows a bugfree version of this. I'm using it forever, but want to get rid of the

"[SM] Exception reported: Client index 0 is invalid" spam (as Skorpion1976 mentioned as well)

Anyone got a fixed version?


Game is L4D1

Last edited by replay_84; 11-23-2022 at 15:55.
replay_84 is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 11-23-2022 , 16:35   Re: [L4D2] Who called the horde?
Reply With Quote #18

Replace IsClientConnected with IsClientInGame
__________________
Silvers is offline
replay_84
Senior Member
Join Date: Jun 2021
Old 11-24-2022 , 17:20   Re: [L4D2] Who called the horde?
Reply With Quote #19

Thanks for the tip. I will try!
replay_84 is offline
replay_84
Senior Member
Join Date: Jun 2021
Old 12-06-2022 , 12:18   Re: [L4D2] Who called the horde?
Reply With Quote #20

Quote:
Originally Posted by Silvers View Post
Replace IsClientConnected with IsClientInGame

Seems like I still get an error



L 12/06/2022 - 15:138: [SM] Exception reported: Client index 0 is invalid
L 12/06/2022 - 15:138: [SM] Blaming: panic_fixed.smx



Quote:


#include <sourcemod>

public OnPluginStart()
{
/* Hook Panic Create event after it has happened */
HookEvent("create_panic_event", OnPanicCreate);
}

public Action:OnPanicCreate(Handle:event, const String:name[], bool:dontBroadcast)
{
/* Copy the UserID from the event over */
new uId = GetEventInt(event, "userid");
/* Now get the person's name */
new client = GetClientOfUserId(uId);
new String:cName[ MAX_NAME_LENGTH ];
GetClientName(client, cName, sizeof(cName));

PrintToChatAll("\x05%s \x01has started the panic event!", cName);
}
replay_84 is offline
Reply


Thread Tools
Display Modes

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 05:17.


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