Welcome, Guest |
You have to register before you can post on our site.
|
|
|
How to keep your Server Memory low[Not my idea] |
Posted by: alterego - 12-17-2016, 09:13 AM - Forum: Tutorials
- Replies (13)
|
|
So people have asked question all over the internet about HAVING BIG MEMORY and that's a problem since it lags the players gaming experience and the more this memory gets bigger it gets lager and lager.
So here are some easy simple tips you might have overlooked on your server.
Number 1:
Have you defined your #define MAX_(e.g MAX_PLAYERS, MAX_HOUSES, MAX_BUSINESSES to a realistic number?
Code: #undef MAX_PLAYERS
#define MAX_PLAYERS 30 //Usually depends on your maximum server
On some research that I found and some experimenting that I did. I have tried defining and not defining the MAX_PLAYER and it gradually changed my memory usage and even .amx file size which is a problem. So I started to define MAX_PLAYERS on a hundred basis and it drastically changed my .amx and memory usage. So if you have a memory problem just define that MAX_PLAYERS and maybe that'll help your problem.
Number 2:
Keep you OnPlayerUpdate almost empty.
What do I mean?
Code: public OnPlayerUpdate(playerid)
{
if(playerTabbed[playerid] == 1)
{
playerTabbed[playerid] = 0;
playerTabbedTime[playerid] = 0;
if(GetPVarType(playerid, "tabbedVW") != 0) {
SetPlayerVirtualWorld(playerid, GetPVarInt(playerid, "tabbedVW"));
DeletePVar(playerid, "tabbedVW");
}
}
playerSeconds[playerid] = gettime();
if(GetPVarInt(playerid, "IsFrozen") == 1) TogglePlayerControllable(playerid, 0);
new pCurWeap = GetPlayerWeapon(playerid);
if(pCurWeap != pCurrentWeapon[playerid])
{
OnPlayerChangeWeapon(playerid, pCurWeap);
pCurrentWeapon[playerid] = pCurWeap;
}
return 1;
}
that's what's inside my OnPlayerUpdate, since the cycle or what term do they use. Well in lay mans term the Cycle or loop the this public uses is pretty much in milliseconds or very fast. I will not indicate numbers since I really don't know how fast the cycle or loop goes but it makes your memory go up so high. Since it loads everything inside the OnPlayerUpdate in a millisecond cycle. Which is very dangerous for the memory. One thing is to keep that public empty or less occupied to lessen the load.
Number 3:
This is the best part.
people have told us about arrays and stuff. and do you understand what they're saying? No, mean either I'm no programmer at least but I know how to script by reading.
So arrays are simply a holder or such example is:
string holds 128 letters from your keyboard you go over that and string won't be able to read it. In lay mans explanation. A human being only have two hands. human[2]. If you get over that capacity of two human hands. A human will not be able to carry anymore because his two hands are used. Is that understandable?
Now let's get back to the array for memory usage.
Here are some codes. Try the difference between this two, compile them and see the difference.
Code: new string[1024];
and
new string[128];
you will see a difference in the size of your .amx and the size of your memory but it might be small but small difference still make a difference.
So keep those arrays as small as possible and don't waste too much on it. If you need 20 letters then keep that 20 letters at bay. don't go higher than that coz it'll cost your server memory a burden.
Now if this have helped you on any occasion a thank you and a rep is only needed, and if you have more tips and tricks for the scripters out there then feel free to post them down there.
If you have any questions or violent reactions feel free to tell me, I might have said something wrong and edit it. I just want to help those who needs them.
Thanks for reading.
|
|
|
Information you have to remember |
Posted by: Manman1232163 - 12-17-2016, 08:59 AM - Forum: Information & Guidelines
- Replies (10)
|
|
Information you will have to remember for SAMP hostings...
1. You should never give out you're password - unless you haven't got trust issues like me... (( Fix for that is to request you're password to be changed ))
2. Inside you're server, you should a always be kind towards your staff members and also you're players (( Number 1 key is to be kind to you're player and make them sure that you have a friendly administrator team... ))
3. Never accept mean players... (( If you have a mean player, (( Roleplay wise )) and they came on to DM and PK without RP, Give them 3 warning, and if they carry on... Kick them... then ban ))
Remember - Never Give you're password away to strangers
|
|
|
[Gamemode]Linko Gaming RP Script ! |
Posted by: Renzkie - 12-17-2016, 07:37 AM - Forum: Releases/Scripts
- Replies (25)
|
|
Linko Gaming Roleplay
Systems:
1.Register/Login system.
2.Tutorial and beginning system.
3.Dynamic doors system.
4.Business system.
5.Dynamic house System.
6.Weapon Restriction system.
7.Auto refund system.
8.All bugs has been fixed.
9.Advertisement system.
10.Anti DDos system.
11.Anti Cheat system.
12.Anti server advertisement system.
13.Anti S0biet system.
14.Press 'N' to enter DD/Biz/House etc...
15.Group/Faction system.
16.Family system.
Credits to:
- Juann - Developer (skype:juann.john33@outlook.com)
- Casper - Bug fixer and Mapper (skype: jack.jax2)
Factions/Groups:
- Los Santos Police Department (LSPD)
- Federal Bureau of Investigation (FBI)
- Los Santos Fire Medic Department (LSFMED)
- Judical System
- San Andreas Government
- San Andreas Service Department
- Hitman Agency
- San Andreas News (SANews)
- San Andreas National Guard (SANG)
NOTE:Factions/Groups can be edited.
Families/Gangs:
There's currently 18 avilable families slots, can be created IG - Family/Gang System.
Administrator Ranks:
Excutive Director - level:99999
Excutive Administrator - level: 99998
Lead Head Administrator - level: 1338
Head Administrator - level: 1337
Senior Administrator - level: 4
General Administrator - level: 3
Junior Administrator - level: 2
Server Moderator - level: 1
Hope you'll like it.
Download link: https://www.solidfiles.com/v/GDvB5wMM7DAxQ
Download link: http://www36.zippyshare.com/v/Y9TxlXD9/file.html
To make yourself Administrator use: /makemeadmin!
Credits goes to the owner .
Regards ,
Renzkie
+1 Rep if this Script HELPED you
|
|
|
How to Fix UNKNOWN Gamemode |
Posted by: Renzkie - 12-17-2016, 07:24 AM - Forum: Tutorials
- Replies (13)
|
|
Always Check Server.cfg and server.log.txt
Change the Plugins line in server.cfg if its uknown
.so For linux Plugins .dll for Windows Plugins
Linux Files must be like this
echo Executing Server Config...
lanmode 0
rcon_password changedforisaac
maxplayers 32
port 7782
hostname Shallow Roleplay[Hiring]
gamemode0 SRP 1
filterscripts Maping PlayerInteriors PlayerExteriors yom_buttons vactions Server
announce 1
query 1
chatlogging 0
mapname San Andreas
weburl www.bloogaming.tk
plugins mysql.so whirlpool.so streamer.so sscanf.so nativechecker.so crashdetect.so
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
maxnpc 0
logtimeformat [%H:%M:%S]
For Windows Files Must be like this
echo Executing Server Config...
lanmode 0
rcon_password changedforisaac
maxplayers 32
port 7782
hostname Shallow Roleplay[Hiring]
gamemode0 SRP 1
filterscripts Maping PlayerInteriors PlayerExteriors yom_buttons vactions Server
announce 1
query 1
chatlogging 0
mapname San Andreas
weburl www.bloogaming.tk
plugins mysql.dll whirlpool.dll streamer.dll sscanf.dll nativechecker.dll crashdetect.dll
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
maxnpc 0
logtimeformat [%H:%M:%S]
IF this tutorial didn't work , try to change the gamemode0 line
gamemode0 [Put your Gamemode file name here that will be seen in gamemode folder]
+1 REP If this tut. helped you .
Dont forger to add my facebook account
www.facebook.com/cjfusilero6
|
|
|
|