SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > 0.3.7-DL RC Scripting

Reply
 
Thread Tools Display Modes
Old 04/11/2017, 02:38 PM   #1
IstuntmanI
High-roller
 
IstuntmanI's Avatar
 
Join Date: Mar 2009
Location: Romania
Posts: 1,885
Reputation: 370
Default Server Browser suggestion for custom models | Few bugs that should be fixed now

Suggestion:
1. While I don't really like the custom server models idea mainly because that'll transform us in some Garry's Mod thing too I don't think that this will be cancelled, so at least let's make it better! Some players (like me) may want to connect on servers that aren't downloading anything, so they could search for servers with no server sided mods in their Server Browser (samp.exe). This idea should look like this:

If the filter is checked, it should show only servers that have a total of 0 mods. Also, at the rules an automatic "mods" should appear, the first value should be the number of mods that can be downloaded in total and the second value is their total size. Some may want to join servers with no mods or just a small amount of mods. The "mods" rule shouldn't be user-defined, but set and calculated automatically, being a read-only rule.

Bug:
1. Well, since I started with a Server Browser suggestion, I'll continue with a Server Browser I only noticed few weeks ago (this may be an old bug) and I didn't want to report yet because no one would give attention to it, but since we got a new RC now and I already made a suggestion about the Server Browser, here we go: so, if you are filtering servers it is still saying the number of players and free slots from ALL UNFILTERED servers, instead of recounting the players amount and free slots from the filtered servers. A photo with what I want to say:

"33695 players, playing on 252 servers. (90449 player slots available)" - which is correct, but if we filter them:

"33693 players, playing on 7 servers. (90449 player slots available)" - only the number of servers got "filtered" in this line, while the amount of players/free slots remained the same (well, I probably refresh a server and the players count got down by 2, doesn't matter, you got it anyway). This should change ALL of that information: the amount of players and free slots should be only the ones from those 7 servers, not from every UNFILTERED server. (by the way, pointing the obvious: 33693 players and 90449 free slots on 7 servers is impossible)

Exploits:
Now, unrelated to the Server Browser, continuing with two exploits that should be fixed in this new version (I didn't check if they are patched in 0.3.8, but I don't think they are) because they can't be fixed by scripting without a third party plugin. SA-MP should filter invalid values by default and ideally also provide those functions available only in plugins:
1. Some players may send invalid data for their Z Aim, we currently can't fix that with the regular SA-MP package because we have no "GetPlayerZAim" function, this can be fixed only with plugins, as they can gain access to the RPCs. This function is provided, for example, by kurta999's YSF: Float:GetPlayerZAim(playerid); . Players sending invalid data may crash (if I remember correctly) other players, so we have to add these bits of codes in our scripts:
Code:
public OnPlayerUpdate( playerid )
{
    new Float:lZAim = GetPlayerZAim( playerid );
    if( lZAim != lZAim ) // afaik, most of them are sending NaN values, not sure if other values too (for who thinks that this will never fail: that's how you check NaN values)
    {
        // eventually kick/ban the cheater or warn admins so they will take a decision
        return 0;
    }
}
2. The same for surfing offsets. YSF provides GetPlayerSurfingOffsets(playerid, &Float:fOffsetX, &Float:fOffsetY, &Float:fOffsetZ); . Here's the code to fix invalid surfing offsets that may crash players (or giving the "Loading..." screen bug, can't remember exactly):
Code:
public OnPlayerUpdate( playerid )
{
    new Float:lSurfOffsets[ 3 ];
    GetPlayerSurfingOffsets( playerid, lSurfOffsets[ 0 ], lSurfOffsets[ 1 ],  lSurfOffsets[ 2 ] );
    if( lSurfOffsets[ 0 ] != lSurfOffsets[ 0 ] || lSurfOffsets[ 1 ] != lSurfOffsets[ 1 ] || lSurfOffsets[ 2 ] != lSurfOffsets[ 2 ] ) // afaik, most of them are sending NaN values, but we should probably also check for huge offsets (take note that some vehicles may have HUGE objects attached to them and players could surf on them, those players would have huge surfing offsets without cheating)
    {
        // eventually kick/ban the cheater or warn admins so they will take a decision
        return 0;
    }
}
__________________


IstuntmanI is offline   Reply With Quote
Old 04/11/2017, 02:40 PM   #2
TopShooter2
Big Clucker
 
TopShooter2's Avatar
 
Join Date: Feb 2017
Posts: 133
Reputation: 57
Default Re: Server Browser suggestion for custom models | Few bugs that should be fixed now

Supporting.
TopShooter2 is offline   Reply With Quote
Old 04/11/2017, 02:43 PM   #3
Whyd
Huge Clucker
 
Whyd's Avatar
 
Join Date: Sep 2012
Location: /
Posts: 425
Reputation: 30
Default Re: Server Browser suggestion for custom models | Few bugs that should be fixed now

Please add this and vehicles, sounds, etc!
Whyd is offline   Reply With Quote
Old 04/11/2017, 02:44 PM   #4
RoyalEmpire
Banned
 
Join Date: Oct 2017
Location: Hacking Place
Posts: 51
Reputation: 2
Default Re: Server Browser suggestion for custom models | Few bugs that should be fixed now

Supporting
RoyalEmpire is offline   Reply With Quote
Old 04/11/2017, 02:45 PM   #5
Saddin
Huge Clucker
 
Saddin's Avatar
 
Join Date: Mar 2011
Posts: 353
Reputation: 35
Default Re: Server Browser suggestion for custom models | Few bugs that should be fixed now

Support just for information for players who want to play with or without some models!
Saddin is offline   Reply With Quote
Old 04/11/2017, 02:52 PM   #6
Eoussama
High-roller
 
Eoussama's Avatar
 
Join Date: Jul 2016
Location: Kingdom of Morocco // Tangier
Posts: 1,151
Reputation: 163
Default Re: Server Browser suggestion for custom models | Few bugs that should be fixed now

Fair enough, I hope this gets taken seriousely!
__________________
Eoussama is offline   Reply With Quote
Old 04/11/2017, 05:13 PM   #7
IlanZ
High-roller
 
IlanZ's Avatar
 
Join Date: Jul 2016
Location: Brasil
Posts: 1,337
Reputation: 72
Default Re: Server Browser suggestion for custom models | Few bugs that should be fixed now

Nice, i approve.
IlanZ is offline   Reply With Quote
Old 04/11/2017, 05:55 PM   #8
FufLa
Big Clucker
 
Join Date: Sep 2009
Posts: 187
Reputation: 21
Default Re: Server Browser suggestion for custom models | Few bugs that should be fixed now

There should also be a fallback mode where you can specify that you do not wish to download any models. The added player skins have a skin id specified that could be used as a fallback. New objects could have the error object we know and love from having outdated samp.img files. At the very least a native to detect whether a player has the "no mods please" toggled on so server owners can decide for themselves whether they want to allow a player to play without their mods or kick them (for the people who want to enforce their mods).

You should not be forced to download stuff from a server.
FufLa is offline   Reply With Quote
Old 04/11/2017, 06:02 PM   #9
Freaksken
Gangsta
 
Freaksken's Avatar
 
Join Date: Mar 2009
Location: Belgium
Posts: 557
Reputation: 225
Default Re: Server Browser suggestion for custom models | Few bugs that should be fixed now

Yes, for the no mods filter!
__________________
Always keep in mind that a lot of people are active on this forum in their spare time.
They are sacrificing time they could easily spend on things they would rather do, to help you instead.


[Include] FCNPC A.I. - [Tutorial] Speedometer - [WIP] Single-player-like Co-op Mission - [Other] List of all my work
Freaksken is offline   Reply With Quote
Old 04/11/2017, 06:06 PM   #10
dugi
Beta Tester
 
Join Date: Jun 2007
Location: Poland
Posts: 4,823
Reputation: 777
Default Re: Server Browser suggestion for custom models | Few bugs that should be fixed now

The information whether the server uses custom models or not is already provided in server rules(artwork variable):
dugi is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Server log bugs that need to be fixed n00blek Scripting Help 2 23/09/2017 09:14 AM
[Tutorial] Using custom models S4t3K Tutorials 17 18/06/2015 10:26 AM
Why Custom Models not in SA-MP maxisaibot Discussion 5 07/05/2014 06:26 PM
Custom Models Trooper[Y] Help Archive 16 29/11/2010 07:19 AM


All times are GMT. The time now is 12:19 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.