Yellow crash screen
#1

Hackers which can crash players ,so the player got yellow screen samp stuck then they got crash out of game how to prevent that is there are any fs or a code??
Reply
#2

Any help please?
Reply
#3

Hire a lot of admins and get the hackers banned. tell your admins to ban them till they will give up
Reply
#4

yellow screen?
The victims are most likely not within the worlds boundaries anymore.
this only happens when you set a players position to sometihng really insane like
X 1000000000.0 Y 1000000000.0 Z 1000000000.0
for example.

You can archieve that "hack" by using cleo.
I don't know if it's okey to post cleo code here, so i won't post a script which does exactly this
to other players
but you can do something to "protect" yourself against that

use this function to check if the players are outside the worlds boundaries:
PHP код:
stock IsPointInMapBounds(Float:xFloat:yFloat:z)//credits to Southclaw, just modifyed it a lil' bit
{
    return ((-
20000.0 <= <= 20000.0) & (-20000.0 <= <= 20000.0) & (-20000.0 <= <= 20000.0)) ? 0;

i've coded an example FS for you.
It stores the last 3 positions of a player and
teleports the player to one of them if he's outside the wordls boundaries:
pawn Код:
//ya, i know that i didn't care about the player driving a car or not,
//just modify it im too lazy right now :P
#include <a_samp>//Credits to the SA-MP Team
#include <YSI\y_timers>//Credits to ******

new Float:tmpwP[MAX_PLAYERS][13];
new tmpwC[MAX_PLAYERS];

main()
{
    printf("Bounds checker has been loaded!\nWill store 3 temp. positions. one every 5 seconds.");
}

ptask boundsCH[5000](playerid)
{
    switch(tmpwC[playerid])
    {
        case 0:GetPlayerPos(playerid, tmpwP[playerid][0], tmpwP[playerid][1], tmpwP[playerid][2]);
        case 1:GetPlayerPos(playerid, tmpwP[playerid][3], tmpwP[playerid][4], tmpwP[playerid][5]);
        case 2:GetPlayerPos(playerid, tmpwP[playerid][6], tmpwP[playerid][7], tmpwP[playerid][8]), tmpwC[playerid] = -1;
    }
    tmpwC[playerid]++;
    GetPlayerPos(playerid,tmpwP[playerid][9], tmpwP[playerid][10], tmpwP[playerid][11]);
    if(!IsPointInMapBounds(tmpwP[playerid][9], tmpwP[playerid][10], tmpwP[playerid][11]))
    {
        SendClientMessage(playerid,-1,"You've been teleported outside the world! Tell the staff members about this.");
        if(IsPointInMapBounds(tmpwP[playerid][0], tmpwP[playerid][1], tmpwP[playerid][2]))
            SetPlayerPos(playerid,tmpwP[playerid][0], tmpwP[playerid][1], tmpwP[playerid][2]);
        else if(IsPointInMapBounds(tmpwP[playerid][3], tmpwP[playerid][4], tmpwP[playerid][5]))
            SetPlayerPos(playerid,tmpwP[playerid][3], tmpwP[playerid][4], tmpwP[playerid][5]);
        else if(IsPointInMapBounds(tmpwP[playerid][6], tmpwP[playerid][7], tmpwP[playerid][8]))
            SetPlayerPos(playerid,tmpwP[playerid][6], tmpwP[playerid][7], tmpwP[playerid][8]);
        else SetPlayerPos(playerid,0,0,4.5);//if none of the points were within the worlds boundaries, port the players somewhere
    }
}

stock IsPointInMapBounds(Float:x, Float:y, Float:z)//Credits to Southclaw, just optimized it a lil' bit
{
    return ((-20000.0 <= x <= 20000.0) & (-20000.0 <= y <= 20000.0) & (-20000.0 <= z <= 20000.0)) ? 1 : 0;
}
We store 3 positions instead of just 1 to be on the safe side.

However, you can't really "detect" who caused that. you'd have to guess it.
the only thing the get rid of such ppls would be to build you own server launcher which scans
the gta directory for bad stuff, asi files, a cleo folder and so on before the player connects.

But there's a huge downside.
Every new player would need that launcher first to connect to your server.
Most of the ppls are too lazy to download the gamelauncher and your server
could even loose a lot of players. atleast thats what happened to mist of the servers
which switched to this gamelauncher method.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)