Написание плагинов

dimon3191

Участник
Сообщения
7
Реакции
0
может кто поправить плагин, а то в консоле такие сообщения выбивает:
L 10/30/2015 - 11:33:11: [SM] Native "SetEntPropString" reported: Property "m_szNetname" not found for entity 2
L 10/30/2015 - 11:33:11: [SM] Native "SetEntPropString" reported: Property "m_szNetname" not found for entity 2
L 10/30/2015 - 11:33:11: [SM] Displaying call stack trace for plugin "auto_bot_name.smx":
L 10/30/2015 - 11:33:11: [SM] Displaying call stack trace for plugin "auto_bot_name.smx":
L 10/30/2015 - 11:33:11: [SM] [0] Line 53, auto_bot_name.sp::CS_SetClientName()
L 10/30/2015 - 11:33:11: [SM] [0] Line 53, auto_bot_name.sp::CS_SetClientName()
L 10/30/2015 - 11:33:11: [SM] [1] Line 43, auto_bot_name.sp::OnClientPutInServer()
L 10/30/2015 - 11:33:11: [SM] [1] Line 43, auto_bot_name.sp::OnClientPutInServer()
L 10/30/2015 - 11:33:11: [SM] Native "GetArrayString" reported: Invalid index 7 (count: 7)
L 10/30/2015 - 11:33:11: [SM] Native "GetArrayString" reported: Invalid index 7 (count: 7)
L 10/30/2015 - 11:33:11: [SM] Displaying call stack trace for plugin "auto_bot_name.smx":
L 10/30/2015 - 11:33:11: [SM] Displaying call stack trace for plugin "auto_bot_name.smx":
L 10/30/2015 - 11:33:11: [SM] [0] Line 42, auto_bot_name.sp::OnClientPutInServer()
L 10/30/2015 - 11:33:11: [SM] [0] Line 42, auto_bot_name.sp::OnClientPutInServer()
L 10/30/2015 - 11:33:11: [SM] Native "SetEntPropString" reported: Property "m_szNetname" not found for entity 4
L 10/30/2015 - 11:33:11: [SM] Native "SetEntPropString" reported: Property "m_szNetname" not found for entity 4
L 10/30/2015 - 11:33:11: [SM] Displaying call stack trace for plugin "auto_bot_name.smx":
L 10/30/2015 - 11:33:11: [SM] Displaying call stack trace for plugin "auto_bot_name.smx":
L 10/30/2015 - 11:33:11: [SM] [0] Line 53, auto_bot_name.sp::CS_SetClientName()
L 10/30/2015 - 11:33:11: [SM] [0] Line 53, auto_bot_name.sp::CS_SetClientName()
L 10/30/2015 - 11:33:11: [SM] [1] Line 43, auto_bot_name.sp::OnClientPutInServer()
L 10/30/2015 - 11:33:11: [SM] [1] Line 43, auto_bot_name.sp::OnClientPutInServer()
L 10/30/2015 - 11:33:11: [SM] Native "GetArrayString" reported: Invalid index 7 (count: 7)
L 10/30/2015 - 11:33:11: [SM] Native "GetArrayString" reported: Invalid index 7 (count: 7)
L 10/30/2015 - 11:33:11: [SM] Displaying call stack trace for plugin "auto_bot_name.smx":
L 10/30/2015 - 11:33:11: [SM] Displaying call stack trace for plugin "auto_bot_name.smx":
L 10/30/2015 - 11:33:11: [SM] [0] Line 42, auto_bot_name.sp::OnClientPutInServer()
L 10/30/2015 - 11:33:11: [SM] [0] Line 42, auto_bot_name.sp::OnClientPutInServer()
L 10/30/2015 - 11:33:11: [SM] Native "SetEntPropString" reported: Property "m_szNetname" not found for entity 6
L 10/30/2015 - 11:33:11: [SM] Native "SetEntPropString" reported: Property "m_szNetname" not found for entity 6
L 10/30/2015 - 11:33:11: [SM] Displaying call stack trace for plugin "auto_bot_name.smx":
L 10/30/2015 - 11:33:11: [SM] Displaying call stack trace for plugin "auto_bot_name.smx":
L 10/30/2015 - 11:33:11: [SM] [0] Line 53, auto_bot_name.sp::CS_SetClientName()
L 10/30/2015 - 11:33:11: [SM] [0] Line 53, auto_bot_name.sp::CS_SetClientName()
L 10/30/2015 - 11:33:12: [SM] [1] Line 43, auto_bot_name.sp::OnClientPutInServer()
L 10/30/2015 - 11:33:12: [SM] [1] Line 43, auto_bot_name.sp::OnClientPutInServer()
L 10/30/2015 - 11:33:12: [SM] Native "SetEntPropString" reported: Property "m_szNetname" not found for entity 7
L 10/30/2015 - 11:33:12: [SM] Native "SetEntPropString" reported: Property "m_szNetname" not found for entity 7
L 10/30/2015 - 11:33:12: [SM] Displaying call stack trace for plugin "auto_bot_name.smx":
L 10/30/2015 - 11:33:12: [SM] Displaying call stack trace for plugin "auto_bot_name.smx":
L 10/30/2015 - 11:33:12: [SM] [0] Line 53, auto_bot_name.sp::CS_SetClientName()
L 10/30/2015 - 11:33:12: [SM] [0] Line 53, auto_bot_name.sp::CS_SetClientName()
L 10/30/2015 - 11:33:12: [SM] [1] Line 43, auto_bot_name.sp::OnClientPutInServer()
L 10/30/2015 - 11:33:12: [SM] [1] Line 43, auto_bot_name.sp::OnClientPutInServer()
L 10/30/2015 - 11:33:12: [SM] Native "SetEntPropString" reported: Property "m_szNetname" not found for entity 8
L 10/30/2015 - 11:33:12: [SM] Native "SetEntPropString" reported: Property "m_szNetname" not found for entity 8
L 10/30/2015 - 11:33:12: [SM] Displaying call stack trace for plugin "auto_bot_name.smx":
L 10/30/2015 - 11:33:12: [SM] Displaying call stack trace for plugin "auto_bot_name.smx":
L 10/30/2015 - 11:33:12: [SM] [0] Line 53, auto_bot_name.sp::CS_SetClientName()
L 10/30/2015 - 11:33:12: [SM] [0] Line 53, auto_bot_name.sp::CS_SetClientName()
L 10/30/2015 - 11:33:12: [SM] [1] Line 43, auto_bot_name.sp::OnClientPutInServer()
L 10/30/2015 - 11:33:12: [SM] [1] Line 43, auto_bot_name.sp::OnClientPutInServer()
L 10/30/2015 - 11:33:12: [SM] Native "GetArrayString" reported: Invalid index 7 (count: 7)
L 10/30/2015 - 11:33:12: [SM] Native "GetArrayString" reported: Invalid index 7 (count: 7)
L 10/30/2015 - 11:33:12: [SM] Displaying call stack trace for plugin "auto_bot_name.smx":
L 10/30/2015 - 11:33:12: [SM] Displaying call stack trace for plugin "auto_bot_name.smx":
L 10/30/2015 - 11:33:12: [SM] [0] Line 42, auto_bot_name.sp::OnClientPutInServer()
L 10/30/2015 - 11:33:12: [SM] [0] Line 42, auto_bot_name.sp::OnClientPutInServer()

P.S. SourceMod 1.4.2 CSS v34
 

Вложения

  • auto_bot_name.sp
    1.5 КБ · Просмотры: 12
  • FULL-auto_bot_names.rar
    5.5 КБ · Просмотры: 12

averin21

Участник
Сообщения
9
Реакции
0
Можешь написать плагин что бы всех игроков кикало кроме тех кого укажу я?
 

Hejter

xor ebx, ebx
Сообщения
1,759
Реакции
393
Можешь написать плагин что бы всех игроков кикало кроме тех кого укажу я?

Пробуй.

PHP:
#pragma semicolon 1
#pragma newdecls required

public void OnClientPostAdminCheck(int client)
{
	char steamid[34];
	GetClientAuthId(client, AuthId_Steam3, steamid, sizeof(steamid), false);
	
	if(!StrEqual(steamid, "STEAM_0:1:1", false) && (!StrEqual(steamid, "STEAM_0:1:2", false)))
	{
		KickClient(client, "Sorry.");
	}
}
 

Mousesports Mouzzz

Участник
Сообщения
27
Реакции
1
1. HE Radius
2. Плагин, с помощью которого, можно было бы изменять радиус поражения HE гранаты. Желательно чтобы был квар для server.cfg, например: sm_he_radius "600"
 

R1KO

fuck society
Сообщения
9,457
Реакции
7,786
PHP:
#include <sourcemod> 
#include <sdktools> 
#include <sdkhooks> 

#pragma semicolon 1 

#define PLUGIN_VERSION "1.0.0.1" 

new Handle:cvar_version; 
new Handle:cvar_damage; 
new Handle:cvar_radius; 

public Plugin:myinfo = 
{ 
    name = "SuperNades", 
    author = "Warbucks", 
    description = "increase damage and radius of grenades", 
    version = PLUGIN_VERSION, 
    url = "http://www.sourcemod.net" 
}; 

public OnPluginStart() 
{ 
    cvar_version = CreateConVar("sm_supernades_version", PLUGIN_VERSION, "SuperNades version", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY); 
    cvar_damage = CreateConVar("sm_supernades_damage", "170", "damage", FCVAR_PLUGIN); // default HE grenade damage in CSS is 100 
    cvar_radius = CreateConVar("sm_supernades_radius", "400", "radius", FCVAR_PLUGIN); // default HE grenade radius in CSS is 350 
} 

public OnEntityCreated(entity, const String:classname[]) 
{ 
    if (StrEqual(classname, "hegrenade_projectile")) 
    { 
         new Float:flHEGrenadeNormalPower  = GetConVarFloat(cvar_damage); 
         new Float:flHEGrenadeNormalRadius = GetConVarFloat(cvar_radius); 
         SetEntPropFloat(entity, Prop_Send, "m_flDamage",  flHEGrenadeNormalPower); 
         SetEntPropFloat(entity, Prop_Send, "m_DmgRadius", flHEGrenadeNormalRadius); 
    } 
}

https://forums.alliedmods.net/showpost.php?p=1321776&postcount=8
 

Mousesports Mouzzz

Участник
Сообщения
27
Реакции
1
R1KO, А там написали что может и не работать

да, походу таки не работает.
А что это такое?
PHP:
public OnEntityCreated(entity, const String:classname[])
{

new Float:flHEGrenadeNormalPower  = GetConVarFloat(cvar_damage);
new Float:flHEGrenadeNormalRadius = GetConVarFloat(cvar_radius);

	if (StrEqual(classname, "hegrenade_projectile"))
	{
	SetEntPropFloat(entity, Prop_Send, "m_flDamage",  flHEGrenadeNormalPower);
	SetEntPropFloat(entity, Prop_Send, "m_DmgRadius", flHEGrenadeNormalRadius);
	}
}
 
Сообщения
1
Реакции
0
Доброго времени суток!вот видела такой плагин,вводишь в чат !com и выводит список всех доступных команд на сервере...как называется этот плагин?найти не могу.вот
 
Сверху Снизу