[Plugin] YSF - kurta999's version

What is it "BroadcastDeath"?
Reply

Quote:
Originally Posted by kurta999
View Post
Windows version works, except low level vehicle tick functions & SetModeRestartTime. I'll remove them and create new higher level functions.
You're not going to completely remove SetModeRestartTime are you? It's useful for testing and stuff.
Reply

No, I will fix it.
Reply

Quote:
Originally Posted by kurta999
View Post
No, I will fix it.


I expected more from R13. By the way, are the vehicle colors fixed ? (GetVehicleColor returning -1, or something like that) I didn't checked it.
Reply

https://github.com/kurta999/YSF/commits/YSF_


Quote:
Originally Posted by Day_
View Post
What is it "BroadcastDeath"?
Just a simple function which will broadcast death RPC - mean same thing will be broadcasted when you die.

Quote:
Originally Posted by Ivory
View Post
There is a probleme with textdraw, TextDrawIsVisible not work on R13 version.
Tested, works.

@kvann:

I will try to fix it, something do not good with SAMP GDK. Maybe downgrade it to same version which streamer use maybe help.

Plus, another thing: I noticed on my server if somebody flood my server with remote rcon flooder, then OnServerMessage will crash at linux... I don't know why. Currently the solution for this is release two linux version, one with OnServerMessage, one without it. If you encounter bugs with OnServerMessage, you would just replace to second version.

BTW, If you want to detect remote rcon login, use OnRemoteRCONPacket

pawn Code:
public OnRemoteRCONPacket(const ipaddr[], port, const password[], success, const command[])
{
    printf("remote console - ip: %s, port: %d, pass: %s, success: %d, command: %s", ipaddr, port, password, success, command);
    if(!success)
    {
        SendRconCommandf("banip %s", ipaddr);
        printf("remote rcon ban %s", ipaddr);
        return 0;
    }
    return 1;
}
E: R13 pre 2, test this. Should work without error messages, I get SAMP GDK from streamer plugin and recompiled with it.

https://github.com/kurta999/YSF/releases/tag/R13
Reply

Tried out pre 2, now i got this:
Quote:

[04/05/2015 23:37:39] [debug] Server crashed while executing sagserver.amx
[04/05/2015 23:37:39] [debug] AMX backtrace:
[04/05/2015 23:37:39] [debug] #0 native PlayerTextDrawGetPos () from YSF.so
[04/05/2015 23:37:39] [debug] #1 000955e0 in public MoveTextDraw (playerid=0) at ../include/Intro.inc:204
[04/05/2015 23:37:39] [debug] #2 0009532c in public ShowIntro (playerid=0) at ../include/Intro.inc:135
[04/05/2015 23:37:39] [debug] Native backtrace:
[04/05/2015 23:37:39] [debug] #0 b5d36e8b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[04/05/2015 23:37:39] [debug] #1 b5d2fbcf in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so
[04/05/2015 23:37:39] [debug] #2 b5d30dbc in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so
[04/05/2015 23:37:39] [debug] #3 b5d31226 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[04/05/2015 23:37:39] [debug] #4 b5d36adc in ?? () from plugins/crashdetect.so
[04/05/2015 23:37:39] [debug] #5 b778b600 in ?? ()
[04/05/2015 23:37:39] [debug] #6 b59ecb2d in ?? () from plugins/YSF.so
[04/05/2015 23:37:39] [debug] #7 080950b4 in ?? () from ./samp03svr
[04/05/2015 23:37:39] [debug] #8 b5d3294b in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[04/05/2015 23:37:39] [debug] #9 b5d358f8 in ?? () from plugins/crashdetect.so
[04/05/2015 23:37:39] [debug] #10 b5d39916 in amx_Exec () from plugins/crashdetect.so
[04/05/2015 23:37:39] [debug] #11 b5d31be6 in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so
[04/05/2015 23:37:39] [debug] #12 b5d35659 in ?? () from plugins/crashdetect.so
[04/05/2015 23:37:39] [debug] #13 b5c81f4a in ?? () from plugins/streamer.so
[04/05/2015 23:37:39] [debug] #14 b59f60a0 in ?? () from plugins/YSF.so

Reply

Oh... I forgot to change MAX_PLAYER to 1000 from 500 in SAMP GDK which I ported from streamer.. It would be a big miracle if this was worked.

Please re-download R13 pre 2 from github Now it's work, I tested myself.
Reply

Quote:
Originally Posted by kurta999
View Post
Oh... I forgot to change MAX_PLAYER to 1000 from 500 in SAMP GDK which I ported from streamer.. It would be a big miracle if this was worked.

Please re-download R13 pre 2 from github Now it's work, I tested myself.
Im having another issue now. OnPlayerSpawn is called on first spawn, but never again after that.
Here is complete OnPlayerSpawn in main script and a hooked one (y_hooks) from one random include.

Code:
public OnPlayerSpawn(playerid)
{
    IsUsingAnimation[playerid] = false;
    ResetPlayerWeapons(playerid);
	SetPlayerSpawn(playerid);
	print("OPS ms called.");
	return 1;
}

hook OnPlayerSpawn(playerid)
{
	print("OPS Teams.inc called");
    FrozenByPolice[playerid] = false;
    return 1;
}
Quote:

[05/05/2015 03:18:47] OPS Teams.inc called
[05/05/2015 03:18:47] OPS ms called.

The callback is never called again, tested with SpawnPlayer() and dying.
It worked with R12 and its working when i dont use YSF R13
Reply

Wait till i go home, i will fix it too.
Reply

I have a problem with 'IsValidPlayerTextDraw' function, she does'nt work on the R13 version.

EDIT : When i use 'PlayerTextDrawGetString' my server crashes. There is a problem with textdraws function.
Reply

On Windows, i have not tested on Linux server.

Код:
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
   	if(MSInfo[playerid][menu_dialogid] > 0)
	{
		if(playertextid == prev_player_text[playerid][7] || playertextid == prev_player_text[playerid][8] || playertextid == prev_player_text[playerid][3] || playertextid == prev_player_text[playerid][4] || playertextid == prev_player_text[playerid][5] || playertextid == prev_player_text[playerid][6])
		{
			new str[32];
			PlayerTextDrawGetString(playerid, playertextid, str);
                        CallLocalFunction("OnMenuPreviewResponse","iiis",playerid, MSInfo[playerid][menu_dialogid], 1, str);
			return 1;
		}
        }
}
With this, my server crashes. On 0.3z with R12 version of your plugin i haven't this problem.
Reply

Quote:
Originally Posted by kurta999
View Post
@kvann:

I will try to fix it, something do not good with SAMP GDK. Maybe downgrade it to same version which streamer use maybe help.

BTW, If you want to detect remote rcon login, use OnRemoteRCONPacket

E: R13 pre 2, test this. Should work without error messages, I get SAMP GDK from streamer plugin and recompiled with it.
Yeah, it's working properly now, without any errors. Also thanks for the tip, the code is a lot simpler now.
Reply

Quote:
Originally Posted by Ivory
View Post
I have a problem with 'IsValidPlayerTextDraw' function, she does'nt work on the R13 version.

EDIT : When i use 'PlayerTextDrawGetString' my server crashes. There is a problem with textdraws function.
At linux or windows? Because for me works without any problem..

Richie©: Fixed.

https://github.com/kurta999/YSF/releases/tag/R13
Reply

you have no idea where it might come? It's really important for me
Reply

No, sorry. For me it worked without problem.

Anyway these callback error messages gone?

I tested R13 latest release myself and everything worked without problem at windows, anybody tested linux version?
Reply

Quote:
Originally Posted by kurta999
Посмотреть сообщение
No, sorry. For me it worked without problem.

Anyway these callback error messages gone?

I tested R13 latest release myself and everything worked without problem at windows, anybody tested linux version?
Thanks for fix kurta.
So far i havent noticed any problem on linux.
Reply

My problem is fixed, I updated all my plugins and includes and it works perfectly. Sorry for the wrong bug, and thank you for this update YSF .
Reply

Kurta, can you make a full server restart? Not just GameModeExit();
I mean, restart of server process.

Sorry for my english.
Reply

I think that's not really possible from inside samp server. But you can do that with .bat file on windows or with .sh at linux.
Reply

I can explain why do I need this and may be you can do it:
for example, when you run SA:MP server at the first time, GangZoneCreate() will return 0 ID of Gang zone (just example), then GameModeExit(); and then GangZoneCreate() will return 1, not 0.
I need to null somehow all this ID's after Game Mode restart...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)