Scripting Forum
This forum is for scripting help, questions, and discussion for SourceMod only. Do not post requests about other projects.
For more information about the SourcePawn language, please see: http://www.sourcemod.net/sdk.php All questions related to working with SourcePawn/SourceMod are welcome! Quick Primer Loading SourceMod See Installing SourceMod. Run-time Info Type "sm" in your server console to get a run-time menu, server-side, for SourceMod. Coding Plugins See the SDK for more information. There are example plugins in the "scripting" folder of the SourceMod package. General scripting language introductions will be available soon. Compiling Plugins In Windows, open up a command prompt and use: Code:
cd <sourcemod>\scripting Code:
./spcomp myplugin.sp Simply put the .smx (not .sp) file in the SourceMod "plugins" folder. |
Re: Scripting Forum
GJ to SourceMod Dev Team.
Cheer! |
Re: Scripting Forum
I cant wait for test this :)
good job |
Re: Scripting Forum
Noob question. What tool or script program is used to code source plugins sp?
|
Re: Scripting Forum
Quote:
|
Re: Scripting Forum
So at the moment there's no tool wich in compiling tells you wich are the scripting errors like amxx? I feel like a donkey watching a palace!
Just when I was starting to understand amxx pawn I feel I have to give the next step to what will be the future in gaming but I feel this wont be easy. |
Re: Scripting Forum
The compiler tells you what and where the errors are, yes. It's pretty easy to tell where your errors are even without something telling you :P
|
Re: Scripting Forum
Except when it's the "omgwtfimanub" errors...like a bad path >.<
|
Re: Scripting Forum
Oi! Go pester someone of your own skill level :D
|
Re: Scripting Forum
i wanted to get the sdk but its a tarbell file . what the hell is that and how do i open it ?????
|
Re: Scripting Forum
Quote:
Use 7-Zip to open it on Windows. EDIT: Also, you don't need the SDK to write scripts. Everything you need is in the main distribution. |
Re: Scripting Forum
yeah ill take a look thru my includes too see . thanks
|
Re: Scripting Forum
Quote:
Code:
'spcom' is not recognized as an internal or external command, operable program or batch file. __________________ I can try to make a nice compiler and code editing program in java, as soon as I fugure out how to compile ._. |
Re: Scripting Forum
Quote:
Quote:
|
Re: Scripting Forum
Quote:
|
Re: Scripting Forum
lol, I didn't see the "p" thanks for clearing it out for me :oops:
btw, anuther way to compile evrything [in your scripting folder, or where your "compile.exe\spcomp.exe" is] is just double clicking it and\or putting a shortcut of the compiler in an easly accessible place ^_^ My idea was of creating a batch file to compile from the desktop and then sending it to the game's addons\sourcemod folder because I am not aware of any kind of scripting tool that actualy uses the scripting folder as base ^_^ I may upload it or its content if I will actualy do it :D [Didn't tried it yet because I wanted to actualy code first, so if im wrong just remove this part :wink:] Edit: SM mods\makers\creators\whatever, if you are plannig to make something like the "AMX Mod X Studio" for SM please tell me so I wont waste my time on a java app if eventualy there will be a nice big program [probebly even more stable and usefull than mine] that can replace mine :| |
Re: Scripting Forum
Pawn Studio? Uses the scripting folder as a base if you point it to spcomp.exe, puts plugins in the plugins folder.
|
Re: Scripting Forum
DJ Tsunami [DJ?!] thx alot for telling me about PawnStudio [even tho you just wrote its name], didn't even know of its existence, now I can finnaly script SourcePawn easly :D
|
Re: Scripting Forum
Quote:
@Echo off color 0a cd D:\Sourcemod\scripting spcomp test.sp pause change the D:\Sourcemod\scripting to your location and the test.sp as yourfilename.sp save it as a .bat and open it. it will work every time you got a difrent file right click the bat and select edit. then change the sp. line again |
Re: Scripting Forum
I am getting a problem with it adding banns and locking them. It does not seem to keep the bans for much time at all. I am not sure what to add to it to fix it. I looked in the .sp and could not find anything wrong with it.
|
Re: Scripting Forum
need help adding comma separator between digits to number, displaying in chat
want chat to display player's points on infected death with comma after thousand, for instance: stupid (10,222) got 1 point for killing infected can't get 10222 number with comma what doI do with this: PrintToChat(i, "%s (%i) got point for killing Infected", Name, (ClientPoints[i] + CurrentPoints[i])); was advised to go http://forums.alliedmods.net/showpos...45&postcount=5 but that requires amxmod. what's the way for sourcemod? |
Re: Scripting Forum
Quote:
Having said that, here's a quick and completely untested port of the AddCommas function to SourceMod. SourceMod only has a float absolute value function, so I did a two's complement to swap the sign. PHP Code:
|
Re: Scripting Forum
Quote:
thank you for your peace of code, it' just doesn't seem like I'm capable of inserting it properly to plugin). if I put it before the block, responsible for displaying client points on infected death, plugin compiles perfectly, but there's no effect - numbers are still displayed in gamechat with no comma between digits. and when I tried to put indicated code directly in the block , I couldn't compile a thing- got like undefined symbols.. pretty sure I'm doing something wrong)). here's where I tried to insert it, but failed (peace of [L4D & L4D2] Custom Player Stats v1.4B105 by muukis, just attempting to adopt to how I'd like stats to be displayed): PHP Code:
|
Re: Scripting Forum
Quote:
PHP Code:
|
Re: Scripting Forum
got it now. thank you for pointing. did as you recommended
PHP Code:
name(1) got points for killing infected name(1)got points for killing infected "1" value never changed. is this because there's sum of clientPoints+current , maybe it'll display properly if referred to some separate value, like just client points or only current (but need some time to earn 1000 currentpoints to see if there's comma:))? or should I install whole piece of code before the block correctly ( I did try that and nothing compiled because of: "AddCommas" already defined) also I tried PHP Code:
name (t)) got points for killing Infected name(v)) got points for killing Infected nema (x)) got points for killing Infected and lots of other different symbols)) |
Re: Scripting Forum
ok tried displaying currentPoints only:
PHP Code:
|
Re: Scripting Forum
Likely the problems are being caused by SourceMod storing strings differently than AMX Mod X does. I'll have to check what needs to be changed to get this working like it should.
|
Re: Scripting Forum
Here's a new version with a few string handling functions changed around to use the ones that deal with bytes rather than cells (which are 4 bytes each).
PHP Code:
|
Re: Scripting Forum
Quote:
|
Re: Scripting Forum
Quote:
PHP Code:
btw, there is another shtick about displaying stats - when it's about special infected, for exapmple: "Name(1,111) got points for (1)Boomer" , boomer is shown with number if there's few of them currently spawned on the map; like when you look at players list thru adminmenu - it says 1. Hunter, 2. (1)hunter, when there's couple of infected of the same tipe. but when you killed (1)Boomer, you can assume there's more nearby, which should be a surprise I suppose. got no clue how to deal with this characters in front of infected name.. |
Re: Scripting Forum
berni shared tis :)
PHP Code:
|
Re: Scripting Forum
Quote:
|
Re: Scripting Forum
Quote:
|
Re: Scripting Forum
Is there a official IRC channel for alliedmods?
|
Re: Scripting Forum
Quote:
|
Re: Scripting Forum
/ Edit. ~Removed.
|
Re: Scripting Forum
Hi, I'm new to making plugins for CS:GO and I was wondering how I can block footstep noises for people inside of an array? I already have the people in the array, I just can't figure out how to block their footstep noises.
|
Re: Scripting Forum
Quote:
|
Re: Scripting Forum
1 Attachment(s)
Hello guys, i know is a probably stupid question, but can you tell me how i can set a maximum health for a vip?
I am a begginer and I kinda wanna to learn, thanks. |
All times are GMT -4. The time now is 03:47. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.