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

Showing results 1 to 21 of 21
Search took 0.00 seconds.
Search: Posts Made By: Silvers
Forum: Snippets and Tutorials 08-17-2022, 15:33
Replies: 83
Views: 137,336
Posted By Silvers
Re: [TUT] SourcePawn Scripting - Tips, Basics to Advanced

int IntToString(int num, char[] str, int maxlength)


https://sm.alliedmods.net/new-api/string/IntToString
Forum: Snippets and Tutorials 04-15-2022, 09:30
Replies: 83
Views: 137,336
Posted By Silvers
Re: [TUT] SourcePawn Scripting - Tips, Basics to Advanced

Should be: MAXPLAYERS+1 not just MAXPLAYERS
Forum: Snippets and Tutorials 03-29-2022, 10:47
Replies: 83
Views: 137,336
Posted By Silvers
Re: [TUT] SourcePawn Scripting - Tips, Basics to Advanced

For something like this optimizing is negligible but I wouldn't advise against optimizing especially if the plugin will be made publicly available. Many public ones have huge performance hits due to...
Forum: Snippets and Tutorials 03-26-2022, 09:21
Replies: 83
Views: 137,336
Posted By Silvers
Re: [TUT] SourcePawn Scripting - Tips, Basics to Advanced

If the entity is not being accessed very often then this may end up using more CPU cycles than EntRefToEntIndex and check. They are not expensive at all, so that statement of yours is wrong.
Forum: Snippets and Tutorials 03-16-2022, 14:22
Replies: 83
Views: 137,336
Posted By Silvers
Re: [TUT] SourcePawn Scripting - Tips, Basics to Advanced

I would have thought deref would be enough but I recall having one or two reports of invalid entities after deref so it seems to be required, very rare cases nonetheless.
Forum: Snippets and Tutorials 03-15-2022, 07:08
Replies: 83
Views: 137,336
Posted By Silvers
Re: [TUT] SourcePawn Scripting - Tips, Basics to Advanced

I'll make it clearer in the post.

You want to use entity references and userid's for anything asynchronous such as CreateTimer, RequestFrame or when you're storing an entity index in an array....
Forum: Snippets and Tutorials 09-20-2021, 13:38
Replies: 83
Views: 137,336
Posted By Silvers
Re: [TUT] SourcePawn Scripting - Tips, Basics to Advanced

Using OnClientPostAdminCheck is bad for anything other than when checking for admin flags, since if Steam goes offline they are not verified and the forward will not trigger.
Forum: Snippets and Tutorials 07-06-2021, 05:05
Replies: 83
Views: 137,336
Posted By Silvers
Forum: Snippets and Tutorials 07-15-2020, 16:17
Replies: 83
Views: 137,336
Posted By Silvers
Re: [TUT] SourcePawn Scripting - Tips, Basics to Advanced

Thanks!

Had already noticed and fixed AddAmbientSoundHook.

Will add a clarification for this: OnLibraryAdded() and OnLibraryRemoved() can be used instead of ever calling LibraryExists() since...
Forum: Snippets and Tutorials 03-24-2020, 10:17
Replies: 83
Views: 137,336
Posted By Silvers
Re: [TUT] SourcePawn Scripting - Tips, Basics to Advanced

Thanks added.

Is + client port really necessary? I don't have mine forwarded and people can connect only when I forward the main port 27016.
Forum: Snippets and Tutorials 03-14-2020, 16:36
Replies: 83
Views: 137,336
Posted By Silvers
Re: [TUT] SourcePawn Scripting - Tips, Basics to Advanced

We're stickied! Thanks! @Mods I'll try to keep this updated over the foreseeable future also feel free to make any changes.

Updated with suggestions from above and added various details to...
Forum: Snippets and Tutorials 03-05-2020, 23:48
Replies: 83
Views: 137,336
Posted By Silvers
Re: [TUT] SourcePawn Scripting - Tips, Basics to Advanced

lol what, not by me... I think you made error posting? I have been meaning to update 1st post for a while, soon eventually I will please bear with me.
Forum: Snippets and Tutorials 02-02-2020, 16:02
Replies: 83
Views: 137,336
Posted By Silvers
Re: [TUT] SourcePawn Scripting - Tips, Basics to Advanced

Well, if you use the sm_dump* commands you can see which properties are Prop_Send or Prop_Data.

I guess it's down to preference. But sometimes depending on entity type DispatchKeyValueVector...
Forum: Snippets and Tutorials 02-01-2020, 19:11
Replies: 83
Views: 137,336
Posted By Silvers
Re: [TUT] SourcePawn Scripting - Tips, Basics to Advanced

Excellent thank you. All changes made.


Request to all:
I would like to compile a recommended list of plugins and extensions to fix issues in various games. Please help by recommending ones for...
Forum: Snippets and Tutorials 02-01-2020, 14:43
Replies: 83
Views: 137,336
Posted By Silvers
Re: [TUT] SourcePawn Scripting - Tips, Basics to Advanced

Oops meant to be .GetValue.


Oops, thanks.


I read this too somewhere but does not seem to be the case. Benchmarking shows what I suggested is quicker. It might still be fast without hooking...
Forum: Snippets and Tutorials 01-31-2020, 18:50
Replies: 83
Views: 137,336
Posted By Silvers
Re: [TUT] SourcePawn Scripting - Tips, Basics to Advanced

It has taken many hours to write but hopefully useful to new scripters, even some vets who might have missed something. Still plenty more to add, I just haven't gotten round to it yet.

The SM wiki...
Forum: Snippets and Tutorials 01-29-2020, 12:28
Replies: 83
Views: 137,336
Posted By Silvers
Re: [TUT] SourcePawn Scripting - Tips, Basics to Advanced

Thanks, I'm not actually very familiar with structs, with the constant changes to enum I've put off learning them. I've linked to some articles which explain it better.



Wow thanks again. Made...
Forum: Snippets and Tutorials 01-27-2020, 21:05
Replies: 83
Views: 137,336
Posted By Silvers
Re: [TUT] SourcePawn Scripting - Tips, Basics to Advanced

@Dragokas: Thanks, added most to first post and linked your post.

@Marttt and @zipcore: Thanks for the additional information, some great points there, will update when I can.




The problem...
Forum: Snippets and Tutorials 01-24-2020, 19:36
Replies: 83
Views: 137,336
Posted By Silvers
Re: [TUT] SourcePawn Scripting - Tips, Basics to Advanced

Replying is fine, I'll update the post every so often. I don't know how to use any Git stuff.

Is GetClientSerial better than GetClientUserID? Any significant differences? I use the latter simply...
Forum: Snippets and Tutorials 01-24-2020, 18:40
Replies: 83
Views: 137,336
Posted By Silvers
Forum: Snippets and Tutorials 01-24-2020, 18:39
Replies: 83
Views: 137,336
Posted By Silvers
[TUT] SourcePawn Scripting - Tips, Basics to Advanced

Please help contribute to this thread and recommend changes, links and information.


Table of Contents:

1. SourceMod Basics and Resource Links
2. Server Setup
3. Connect to Server
4....
Showing results 1 to 21 of 21

 
Forum Jump

All times are GMT -4. The time now is 00:42.


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