hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2024.05.09. 03:44



Jelenlévő felhasználók

Jelenleg 395 felhasználó van jelen :: 2 regisztrált, 0 rejtett és 393 vendég

A legtöbb felhasználó (1565 fő) 2020.11.21. 11:26-kor tartózkodott itt.

Regisztrált felhasználók: Bing [Bot], Majestic-12 [Bot] az elmúlt 5 percben aktív felhasználók alapján

Utoljára aktív
Ahhoz hogy lásd ki volt utoljára aktív, be kell jelentkezned.



Az oldal teljeskörű
használatához regisztrálj.

Regisztráció

Kereső


Új téma nyitása  Hozzászólás a témához  [ 6 hozzászólás ] 
Szerző Üzenet
HozzászólásElküldve: 2013.07.04. 18:21 
Offline
Felfüggesztve

Csatlakozott: 2013.04.21. 02:42
Hozzászólások: 215
Megköszönt másnak: 8 alkalommal
Megköszönték neki: 2 alkalommal
Sziasztok... elsőnek is bocsi nem tudom hova nyithattam volna...
Kellene egy kis segítség...
Zprops lenne... sp filém van... nem engedi át convertálni smx-be! Ebben kellene segítség...

Ez a baja:

SourcePawn Compiler 1.4.0
Copyright (c) 1997-2006, ITB CompuPhase, (C)2004-2008 AlliedModders, LLC

/home/groups/sourcemod/upload_tmp/phpGeK2BS.sp(12) : fatal error 120: cannot read from file: "smlib"

Compilation aborted.
1 Error.

SMA fórráskódként be másolom!Fontos lenne a segítség hogy ki javítva vissza kapjam! Mert modosítani akarok benne pár dolgot!:$

SMA Forráskód: [ Mindet kijelol ]
  1. /*
  2. OM PropSpawn V3.0
  3.  * Author: Owned|Myself
  4.  * Contact: Please post on the forums!
  5.  *
  6.  * Sorry this took so long!
  7.  */
  8.  
  9. // Include the neccesary files
  10. #include <sourcemod>
  11. #include <sdktools>
  12. #include <smlib>
  13.  
  14. //Make it neccesary to have semicolons at the end of each line
  15. #pragma semicolon 1
  16.  
  17. new bool:plug_debug = false;
  18.  
  19. //Version
  20. new String:sVersion[5] = "3.0.2";
  21. //Prefix
  22. new String:sPrefix[256] = "\x01\x03[\x04PropSpawn\x03]\x01";
  23.  
  24. //Player properties (credits)
  25. new iDefCredits = 20;
  26. new iCredits[MAXPLAYERS+1];
  27. new iPropNo[MAXPLAYERS+1];//Stores the number of props a player has
  28. new Handle:hCredits = INVALID_HANDLE;
  29.  
  30. //Team Only
  31. // Teams:
  32. // 0 = No restrictions
  33. // 1 = T
  34. // 2 = CT
  35. new iTeam = 2;
  36. //ConVar Handle
  37. new Handle:hTeamOnly = INVALID_HANDLE;
  38. //Admin only
  39. new bool:bAdminOnly = false;
  40. new Handle:hAdminOnly = INVALID_HANDLE;
  41. //Remove props on death
  42. new Handle:hRemoveProps = INVALID_HANDLE;
  43. new bool:bRemoveProps = true;
  44. //Add Credits on death
  45. new Handle:hCreditsOnDeath = INVALID_HANDLE;
  46. new bool:bCreditsOnDeath = false;
  47. new iDeathCreditNo = 5;
  48. new Handle:hDeathCreditNo = INVALID_HANDLE;
  49.  
  50. // Prop Command String
  51. new String:sPropCommand[256] = "props";
  52.  
  53. //The Menu
  54. new Handle:om_public_prop_menu = INVALID_HANDLE;
  55.  
  56. public Plugin:myinfo =
  57. {
  58. name = "OM Prop Spawn",
  59. author = "Owned|Myself",
  60. description = "A plugin which allows you to spawn physics props predefined in a text file: Public Version with Credits",
  61. version = sVersion,
  62. url = "http://forums.alliedmods.net/showthread.php?t=119238"
  63. };
  64.  
  65. public OnPluginStart()
  66. {
  67. LoadTranslations("om_propspawn.phrases");
  68. // Control ConVars. 1 Team Only, Public Enabled etc.
  69. hTeamOnly = CreateConVar("om_prop_teamonly", "2", "0 is no team restrictions, 1 is Terrorist and 2 is CT. Default: 2");
  70. hAdminOnly = CreateConVar("om_prop_public", "0", "0 means anyone can use this plugin. 1 means admins only (no credits used)");
  71.  
  72. // Create the version convar!
  73. CreateConVar("om_propspawn_version", sVersion, "OM Prop Spawn Version",FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_UNLOGGED|FCVAR_DONTRECORD|FCVAR_REPLICATED|FCVAR_NOTIFY);
  74. // Register the Credits Command
  75. RegConsoleCmd("credits", Command_Credits);
  76. // Hook Player Spawn to restore player credits when they spawn
  77. HookEvent("player_spawn" , Event_PlayerSpawn);
  78. // Hook when the player dies so that props can be removed
  79. HookEvent("player_death", Event_PlayerDeath);
  80. HookEvent("player_disconnect", Event_PlayerDisconnect);
  81. HookEvent("round_start", Event_RoundStart);
  82.  
  83. new String:tempCredits[5];
  84. IntToString(iDefCredits, tempCredits, sizeof(tempCredits));
  85. // Convar to control the credits players get when they spawn (default above)
  86. hCredits = CreateConVar("om_prop_credits", tempCredits, "The number of credits each player should have when they spawn");
  87.  
  88. /* NEW STUFF */
  89. hRemoveProps = CreateConVar("om_prop_removeondeath", "1", "0 is keep the props on death, 1 is remove them on death. Default: 1");
  90. hCreditsOnDeath = CreateConVar("om_prop_addcreditsonkill", "0", "0 is off, 1 is on. Default: 0");
  91. hDeathCreditNo = CreateConVar("om_prop_killcredits", "5", "Change this number to change the number of credits a player gets when they kill someone");
  92.  
  93. //Hook all the ConVar changes
  94. HookConVarChange(hTeamOnly, OnConVarChanged);
  95. HookConVarChange(hAdminOnly, OnConVarChanged);
  96. HookConVarChange(hCredits, OnConVarChanged);
  97. HookConVarChange(hRemoveProps, OnConVarChanged);
  98. HookConVarChange(hCreditsOnDeath, OnConVarChanged);
  99. HookConVarChange(hDeathCreditNo, OnConVarChanged);
  100.  
  101. // Register the admin command to add credits (or remove if a minus number is used)
  102. RegAdminCmd("om_admin_credits", AdminCreditControl, ADMFLAG_SLAY, "Admin Credit Control Command for OM PropSpawn");
  103. RegAdminCmd("om_remove_prop", AdminRemovePropAim, ADMFLAG_SLAY, "Admin Prop Removal by aim");
  104. RegConsoleCmd(sPropCommand, PropCommand);
  105. }
  106.  
  107. public OnConVarChanged(Handle:convar, const String:oldValue[], const String:newValue[])
  108. {
  109. if(convar == hTeamOnly)
  110. iTeam = GetConVarInt(convar);
  111. if(convar == hAdminOnly)
  112. bAdminOnly = GetConVarBool(convar);
  113. if(convar == hCredits)
  114. iDefCredits = GetConVarInt(convar);
  115. if(convar == hRemoveProps)
  116. bRemoveProps = GetConVarBool(convar);
  117. if(convar == hCreditsOnDeath)
  118. bCreditsOnDeath = GetConVarBool(convar);
  119. if(convar == hDeathCreditNo)
  120. iDeathCreditNo = GetConVarInt(convar);
  121. }
  122.  
  123. public Action:Command_Credits(client, args)
  124. {
  125. new tempCredits = iCredits[client];
  126. PrintToChat(client, "%T", "Blance", sPrefix, tempCredits);
  127. }
  128.  
  129. public Event_PlayerSpawn(Handle: event , const String: name[] , bool: dontBroadcast)
  130. {
  131. new userid = GetEventInt(event, "userid");
  132. new client = GetClientOfUserId(userid);
  133. iCredits[client] = iDefCredits;
  134. }
  135.  
  136. public Event_PlayerDeath(Handle: event , const String: name[] , bool: dontBroadcast)
  137. {
  138. new victimuserid = GetEventInt(event, "userid");
  139. new victim = GetClientOfUserId(victimuserid);
  140. new attackeruserid = GetEventInt(event, "attacker");
  141. new attacker = GetClientOfUserId(attackeruserid);
  142.  
  143. if(!Client_IsValid(attacker))
  144. {
  145. return;
  146. }
  147.  
  148. if(bCreditsOnDeath)
  149. {
  150. PrintToChat(attacker, "%T", "Reward", sPrefix, iDeathCreditNo);
  151. iCredits[attacker] += iDeathCreditNo;
  152. }
  153.  
  154. if(bRemoveProps)
  155. {
  156. KillProps(victim);
  157. }
  158. }
  159.  
  160. public Event_PlayerDisconnect(Handle:event, const String:name[], bool:dontBroadcast)
  161. {
  162. new userid = GetEventInt(event, "userid");
  163. new client = GetClientOfUserId(userid);
  164. KillProps(client);
  165. }
  166.  
  167. public Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
  168. {
  169. for(new i=1; i<=MaxClients; i++)
  170. {
  171. iPropNo[i] = 0;
  172. }
  173. }
  174.  
  175. stock KillProps(client)
  176. {
  177. for(new i=0; i<=iPropNo[client]; i++)
  178. {
  179. new String:EntName[MAX_NAME_LENGTH+5];
  180. Format(EntName, sizeof(EntName), "OMPropSpawnProp%d_number%d", client, i);
  181. new prop = Entity_FindByName(EntName);
  182. if(prop != -1)
  183. AcceptEntityInput(prop, "kill");
  184. }
  185. iPropNo[client] = 0;
  186. }
  187.  
  188. public Action:AdminRemovePropAim(client, args)
  189. {
  190. new prop = GetClientAimTarget(client, false);
  191. new String:EntName[256];
  192. Entity_GetName(prop, EntName, sizeof(EntName));
  193. if(plug_debug)
  194. {
  195. PrintToChatAll(EntName);
  196. }
  197.  
  198. new validProp = StrContains(EntName, "OMPropSpawnProp");
  199.  
  200. if(validProp > -1)
  201. {
  202. //Remove the prop
  203. /* Find the client index in the string */
  204. new String:tempInd[3];
  205. tempInd[0] = EntName[15];
  206. tempInd[1] = EntName[16];
  207. tempInd[2] = EntName[17];
  208.  
  209. if(plug_debug)
  210. {
  211. PrintToChat(client, tempInd);
  212. }
  213.  
  214. /* We should now have the numbers somewhere, let's find out where */
  215. ReplaceString(tempInd, sizeof(tempInd), "_", "");
  216. if(plug_debug)
  217. {
  218. PrintToChat(client, tempInd);
  219. }
  220. new clientIndex = StringToInt(tempInd);
  221. AcceptEntityInput(prop, "kill");
  222. iPropNo[clientIndex] = iPropNo[clientIndex] - 1;
  223. }
  224. else
  225. {
  226. PrintToChat(client, "%T", "Delete", client, sPrefix);
  227. }
  228.  
  229. return Plugin_Handled;
  230. }
  231.  
  232. public Action:AdminCreditControl(client, args)
  233. {
  234. if (args < 1)
  235. {
  236. PrintToConsole(client, "Usage: om_admin_credits <name> <credits>");
  237. return Plugin_Handled;
  238. }
  239.  
  240. new String:targetName[MAX_NAME_LENGTH];
  241. GetCmdArg(1, targetName, sizeof(targetName));
  242.  
  243. new String:SteamID[256];
  244. GetClientAuthString(client, SteamID, sizeof(SteamID));
  245.  
  246. new target = Client_FindByName(targetName);
  247.  
  248. if (target == -1)
  249. {
  250. PrintToConsole(client, "Could not find any player with the name: \"%s\"", targetName);
  251. return Plugin_Handled;
  252. }
  253.  
  254. new String:NewCredits[32];
  255. GetCmdArg(2, NewCredits, sizeof(NewCredits));
  256. new ModCredits = StringToInt(NewCredits);
  257. iCredits[target] += ModCredits;
  258. PrintToChat(target, "%T", "Credits", client, sPrefix, iCredits[target]);
  259. LogAction(client, -1, "\"%s\" added %d credits to \"%s\"", SteamID, ModCredits, targetName);
  260.  
  261. return Plugin_Handled;
  262.  
  263. }
  264.  
  265. public Action:PropCommand(client, args)
  266. {
  267. if(!Client_IsValid(client))
  268. return Plugin_Handled;
  269.  
  270. if(iTeam > 0)
  271. {
  272. if(GetClientTeam(client) != iTeam+1)
  273. {
  274. PrintToChat(client, "%T", "Sorry", client, sPrefix);
  275. return Plugin_Handled;
  276. }
  277. }
  278. if(bAdminOnly)
  279. {
  280. if(!Client_IsAdmin(client))
  281. {
  282. PrintToChat(client, "%T", "Sorry2", client, sPrefix);
  283. return Plugin_Handled;
  284. }
  285. }
  286.  
  287. if(!IsPlayerAlive(client))
  288. {
  289. if(!Client_IsAdmin(client))
  290. {
  291. PrintToChat(client, "%T", "Sorry3", client, sPrefix);
  292. return Plugin_Handled;
  293. }
  294. }
  295.  
  296. new String:textPath[255];
  297. BuildPath(Path_SM, textPath, sizeof(textPath), "configs/om_public_props.txt");
  298. new Handle:kv = CreateKeyValues("Props");
  299. FileToKeyValues(kv, textPath);
  300. om_public_prop_menu = CreateMenu(Public_Prop_Menu_Handler);
  301. SetMenuTitle(om_public_prop_menu, "%T", "Menu", client, iCredits[client]);
  302. PopLoop(kv, client);
  303. DisplayMenu(om_public_prop_menu, client, MENU_TIME_FOREVER);
  304.  
  305. return Plugin_Handled;
  306. }
  307.  
  308. // Make sure you populate the menu, Runs through the keyvalues.
  309. PopLoop(Handle:kv, client)
  310. {
  311. if (KvGotoFirstSubKey(kv))
  312. {
  313. do
  314. {
  315. new String:buffer[256];
  316. KvGetSectionName(kv, buffer, sizeof(buffer));
  317. new admin = KvGetNum(kv, "adminonly", 0); //New, Allows for admin only props
  318. if(admin == 1)
  319. {
  320. if(Client_IsAdmin(client))
  321. {
  322. new String:price[256];
  323. KvGetString(kv, "price", price, sizeof(price), "0");
  324. new String:MenuItem[256];
  325. Format(MenuItem, sizeof(MenuItem), "%s - Price: %s", buffer, price);
  326. AddMenuItem(om_public_prop_menu, buffer, MenuItem);
  327. }
  328. }
  329. else
  330. {
  331. new String:price[256];
  332. KvGetString(kv, "price", price, sizeof(price), "0");
  333. new String:MenuItem[256];
  334. Format(MenuItem, sizeof(MenuItem), "%s - Price: %s", buffer, price);
  335. AddMenuItem(om_public_prop_menu, buffer, MenuItem);
  336. }
  337. }
  338. while (KvGotoNextKey(kv));
  339. CloseHandle(kv);
  340. }
  341. }
  342.  
  343. public Public_Prop_Menu_Handler(Handle:menu, MenuAction:action, param1, param2)
  344. {
  345. // Note to self: param1 is client, param2 is choice.
  346. if (action == MenuAction_Select)
  347. {
  348. // Initiate the Prop Spawning using Client and Choice as the parameters.
  349. PropSpawn(param1, param2);
  350. new String:textPath[255];
  351. BuildPath(Path_SM, textPath, sizeof(textPath), "configs/om_public_props.txt");
  352. new Handle:kv = CreateKeyValues("Props");
  353. FileToKeyValues(kv, textPath);
  354. om_public_prop_menu = CreateMenu(Public_Prop_Menu_Handler);
  355. SetMenuTitle(om_public_prop_menu, "%T", "Menu", LANG_SERVER, iCredits[param1]);
  356. PopLoop(kv, param1);
  357. DisplayMenu(om_public_prop_menu, param1, MENU_TIME_FOREVER);
  358. }
  359. }
  360.  
  361. // Prop Spawning! This does all the calculations and spawning.
  362. public PropSpawn(client, param2)
  363. {
  364. new String:prop_choice[255];
  365.  
  366. GetMenuItem(om_public_prop_menu, param2, prop_choice, sizeof(prop_choice));
  367.  
  368. new String:name[255];
  369. GetClientName(client, name, sizeof(name));
  370.  
  371. decl String:modelname[255];
  372. new Price;
  373. new String:file[255];
  374. BuildPath(Path_SM, file, 255, "configs/om_public_props.txt");
  375. new Handle:kv = CreateKeyValues("Props");
  376. FileToKeyValues(kv, file);
  377. KvJumpToKey(kv, prop_choice);
  378. KvGetString(kv, "model", modelname, sizeof(modelname),"");
  379. Price = KvGetNum(kv, "price", 0);
  380. new ClientCredits = iCredits[client];
  381.  
  382. if (Price > 0)
  383. {
  384. if (ClientCredits >= Price)
  385. {
  386. if(bAdminOnly)
  387. {
  388. PrintToChat(client, "%T", "Spawn", sPrefix, prop_choice);
  389. LogAction(client, -1, "\"%s\" spawned a %s", name, prop_choice);
  390. }
  391. else
  392. {
  393. ClientCredits = ClientCredits - Price;
  394. iCredits[client] = ClientCredits;
  395. PrintToChat(client, "%T", "Spawn2", client, sPrefix, prop_choice, Price);
  396. }
  397. }
  398. else
  399. {
  400. PrintToChat(client, "%T", "NoCredits", client, sPrefix);
  401. return;
  402. }
  403. }
  404.  
  405. else
  406. {
  407. PrintToChat(client, "%T", "Spawn3", client, sPrefix, prop_choice);
  408. }
  409. decl Ent;
  410. PrecacheModel(modelname,true);
  411. Ent = CreateEntityByName("prop_physics_override");
  412.  
  413. new String:EntName[256];
  414. Format(EntName, sizeof(EntName), "OMPropSpawnProp%d_number%d", client, iPropNo[client]);
  415.  
  416. DispatchKeyValue(Ent, "physdamagescale", "0.0");
  417. DispatchKeyValue(Ent, "model", modelname);
  418. DispatchKeyValue(Ent, "targetname", EntName);
  419. DispatchSpawn(Ent);
  420.  
  421. decl Float:FurnitureOrigin[3];
  422. decl Float:ClientOrigin[3];
  423. decl Float:EyeAngles[3];
  424. GetClientEyeAngles(client, EyeAngles);
  425. GetClientAbsOrigin(client, ClientOrigin);
  426.  
  427. FurnitureOrigin[0] = (ClientOrigin[0] + (50 * Cosine(DegToRad(EyeAngles[1]))));
  428. FurnitureOrigin[1] = (ClientOrigin[1] + (50 * Sine(DegToRad(EyeAngles[1]))));
  429. FurnitureOrigin[2] = (ClientOrigin[2] + KvGetNum(kv, "height", 100));
  430.  
  431. TeleportEntity(Ent, FurnitureOrigin, NULL_VECTOR, NULL_VECTOR);
  432. SetEntityMoveType(Ent, MOVETYPE_VPHYSICS);
  433.  
  434. CloseHandle(kv);
  435.  
  436. iPropNo[client] += 1;
  437.  
  438. return;
  439. }


Előre is köszi!:)

_________________
Vagyok amilyen vagyok,
mindenkit bannolok.
Kivételezni nem fogok,
de KP -t lehet elfogadok.


Hozzászólás jelentése
Vissza a tetejére
   
HozzászólásElküldve: 2013.07.04. 18:31 
Offline
Tiszteletbeli

Csatlakozott: 2010.02.04. 19:12
Hozzászólások: 3528
Megköszönt másnak: 26 alkalommal
Megköszönték neki: 180 alkalommal
nincs meg a konvertálónak az smlib include
szerintem ne a neten konvertáld, sourcemodra nem tudom mi van, biztos van oda is valami konvertáló, oda beteszed neki még ezt az include-t

_________________
http://www.ebateam.eu/


Hozzászólás jelentése
Vissza a tetejére
   
HozzászólásElküldve: 2013.07.04. 20:50 
Offline
Felfüggesztve

Csatlakozott: 2013.04.21. 02:42
Hozzászólások: 215
Megköszönt másnak: 8 alkalommal
Megköszönték neki: 2 alkalommal
És ilyet honnan tudok letölteni?:O

_________________
Vagyok amilyen vagyok,
mindenkit bannolok.
Kivételezni nem fogok,
de KP -t lehet elfogadok.


Hozzászólás jelentése
Vissza a tetejére
   
HozzászólásElküldve: 2013.07.07. 19:02 
Offline
Felfüggesztve
Avatar

Csatlakozott: 2013.06.09. 18:47
Hozzászólások: 2004
Megköszönt másnak: 1 alkalommal
Megköszönték neki: 220 alkalommal
http://forums.alliedmods.net/showthread.php?p=1403850

Pontosabban.: http://www.sourcemodplugins.org/smlib/

raptor666 írta:
És ilyet honnan tudok letölteni?:O

_________________
Ha elnyerte valamelyik témában a hozzászólásom a tetszésedet melyet olvastál, akkor egy egyszerű gombnyomással kifejezheted, hogy tetszett.


Hozzászólás jelentése
Vissza a tetejére
   
HozzászólásElküldve: 2013.07.07. 21:05 
Offline
Felfüggesztve

Csatlakozott: 2013.04.21. 02:42
Hozzászólások: 215
Megköszönt másnak: 8 alkalommal
Megköszönték neki: 2 alkalommal
Köszi ! de a konvertálóra gondoltam!

_________________
Vagyok amilyen vagyok,
mindenkit bannolok.
Kivételezni nem fogok,
de KP -t lehet elfogadok.


Hozzászólás jelentése
Vissza a tetejére
   
HozzászólásElküldve: 2013.07.08. 08:28 
Offline
Felfüggesztve
Avatar

Csatlakozott: 2013.06.09. 18:47
Hozzászólások: 2004
Megköszönt másnak: 1 alkalommal
Megköszönték neki: 220 alkalommal
raptor666 írta:
Köszi ! de a konvertálóra gondoltam!




1, Megnyitod amit csatoltam, és mappák szerint elhelyezed a kívánt helyre.

2, scripting mappába belépsz és a .sp filet behúzod a compiler.exe be ha jól tudom, és utána megnyitod a a compiler mappát, és ott lesz az .smx file.

Remélem tudtam segíteni!

FONTOS! Mappák szerint tedd be!

Üdv. Anonymous1337


Csatolmányok:
smlib_0.11.rar [68.62 KiB]
Letöltve 32 alkalommal.

_________________
Ha elnyerte valamelyik témában a hozzászólásom a tetszésedet melyet olvastál, akkor egy egyszerű gombnyomással kifejezheted, hogy tetszett.
Hozzászólás jelentése
Vissza a tetejére
   
Hozzászólások megjelenítése:  Rendezés  
Új téma nyitása  Hozzászólás a témához  [ 6 hozzászólás ] 


Ki van itt

Jelenlévő fórumozók: nincs regisztrált felhasználó valamint 1 vendég


Nyithatsz új témákat ebben a fórumban.
Válaszolhatsz egy témára ebben a fórumban.
Nem szerkesztheted a hozzászólásaidat ebben a fórumban.
Nem törölheted a hozzászólásaidat ebben a fórumban.
Nem küldhetsz csatolmányokat ebben a fórumban.

Keresés:
Ugrás:  
Powered by phpBB® Forum Software © phpBB Limited
Magyar fordítás © Magyar phpBB Közösség
Portal: Kiss Portal Extension © Michael O'Toole