#include <sourcemod> #include <sdktools> #include <sdkhooks> #define PLUGIN_VERSION "v1.0" public Plugin:myinfo = { name = "ZM Kit", author = "Knopers", description = "Plugin dla snickersa", version = "PLUGIN_VERSION", url = "" }; public OnPluginStart() { CreateConVar("sm_zmkit", PLUGIN_VERSION, "version", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY); HookEvent("player_spawn", Event_PlayerSpawn); PrintToServer("[Knopers]Plugin wlanczony"); RegServerCmd("say !kit", Command_Test); } public Action:Event_PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast) { new client = GetClientOfUserId(GetEventInt(event, "userid")); if ( (IsClientInGame(client)) && (IsPlayerAlive(client) && GetClientTeam(client) > 1) ) { GivePlayerItem(client, "weapon_hegrenade"); GivePlayerItem(client, "weapon_smokegrenade"); GivePlayerItem(client, "item_nvgs"); PrintToChatAll("\x03[KIT]\x01Granaty dodane"); } } public Action:Command_Test(client, args) { if (IsClientInGame(i) && IsPlayerAlive) { GivePlayerItem(client, "weapon_hegrenade"); } }
Witamy w Nieoficjalnym polskim support'cie AMX Mod X
Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
|

[ROZWIĄZANE] Nie da się skomplikować
#1
Napisano 19.01.2013 00:02
#2
Napisano 19.01.2013 00:16
#3
Napisano 19.01.2013 00:22
C:\srcds\css\cstrike\addons\sourcemod\scripting>spcomp knopers.sp SourcePawn Compiler 1.5.0-dev+3742 Copyright © 1997-2006, ITB CompuPhase, ©2004-2008 AlliedModders, LLC knopers.sp(20) : error 100: function prototypes do not match knopers.sp(36) : error 017: undefined symbol "i" 2 Errors.
#4
Napisano 19.01.2013 00:53
#include <sdktools>
#include <sdkhooks>
dodałeś te moduły do lokalnego kompilatora?
#5
Napisano 19.01.2013 01:12
#6
Napisano 19.01.2013 01:37
if (IsClientInGame(i) && IsPlayerAlive)
zamień na:
if (IsClientInGame(client) && IsPlayerAlive(client) )
i zmień:
RegServerCmd("say !kit", Command_Test);
na:
RegConsoleCmd("say !kit", Command_Test);
I możesz to skompilować kompilatorem www na amxx.pl - http://amxx.pl/source-kompilator/
#7
Napisano 19.01.2013 01:43
Czemu dział Amx?Kawon (11 minut temu):
czemu dział Scripting SM ?
Scripting AMXX > Prośby o kompilacje pluginów / Problemy z kompilacją
Użytkownik mikrus edytował ten post 19.01.2013 01:46
#8
Napisano 19.01.2013 12:04

/* Plugin Template generated by Pawn Studio */ #include <sourcemod> #include <sdktools> #include <sdkhooks> #define PLUGIN_VERSION "v1.0" public Plugin:myinfo = { name = "ZM Kit", author = "Knopers", description = "Plugin dla snickersa", version = "PLUGIN_VERSION", url = "" }; public OnPluginStart() { CreateConVar("sm_zmkit", PLUGIN_VERSION, "version", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY); HookEvent("player_spawn", Event_PlayerSpawn); PrintToServer("[Knopers]Plugin wlanczony"); RegConsoleCmd("say !kit", sm_kit); } public Action:Event_PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast) { new client = GetClientOfUserId(GetEventInt(event, "userid")); if ( (IsClientInGame(client)) && (IsPlayerAlive(client) && GetClientTeam(client) > 1) ) { GivePlayerItem(client, "weapon_hegrenade"); GivePlayerItem(client, "weapon_smokegrenade"); GivePlayerItem(client, "item_nvgs"); PrintToChatAll("\x03[KIT]\x01Granaty dodane"); } } public Action:sm_kit(client, args) { if (IsClientInGame(client) && IsPlayerAlive(client) ) { GivePlayerItem(client, "weapon_p90"); } }
#9
Napisano 19.01.2013 15:29
#10
Napisano 19.01.2013 15:38
RegConsoleCmd("say !kit", sm_kit);na
RegConsoleCmd("sm_kit", sm_kit);Dziękuje wszystkim za pomoc.Temat do zamknięcia.
Użytkownik knopers666 edytował ten post 19.01.2013 15:41
#11
Napisano 19.01.2013 17:21
Ten temat został zamknięty przez moderatora.
Powód: Pomoc udzielona
Jeśli się z tym nie zgadzasz,

Z pozdrowieniami,
Zespół AMXX.PL
Użytkownicy przeglądający ten temat: 0
0 użytkowników, 0 gości, 0 anonimowych