Vice City: Multiplayer

Server Development => Scripting and Server Management => Script Showroom => Topic started by: UncleRus on Aug 18, 2020, 04:59 PM

Title: [GAMEMODE]DeathMatch v1.1
Post by: UncleRus on Aug 18, 2020, 04:59 PM
Hi guys today I am posting my script that I did with my brothers. This is an update of my earlier script. The plugins needed sqlite04rel32 squirrel04rel32 announce04rel32 hashing04rel32 xmlconf04rel32 I made a script with my brothers on a 32 bit system but you can barter for 64 bit depending on your system. this script I used subscripts For vehicle system thanks to KrloZz, as well as Mohamed's Account System, Sebastian Animation`s pack,Link https://drive.google.com/file/d/1PfUAYk1p1Mf3d842Sk9gDNt1kVvp1Ksa/view?usp=sharing
If you see any error, write here in this topic, we will try to solve.In server storage i put easter egg mini:)
Title: Re: [GAMEMODE]DeathMatch v1.1
Post by: Alpays on Aug 18, 2020, 07:42 PM
nice
Title: Re: [GAMEMODE]DeathMatch v1.1
Post by: longhackmc on Aug 30, 2020, 06:04 PM

it didn't work, there was an error with the database
Title: Re: [GAMEMODE]DeathMatch v1.1
Post by: shaddam17 on Sep 22, 2020, 08:08 PM
Same database problem here too
Title: Re: [GAMEMODE]DeathMatch v1.1
Post by: SHy^ on Sep 23, 2020, 01:47 AM
Post error screenshot & line
Title: Re: [GAMEMODE]DeathMatch v1.1
Post by: shaddam17 on Sep 23, 2020, 10:12 AM
Running it on windows 32bit is working now.
Title: Re: [GAMEMODE]DeathMatch v1.1
Post by: UncleRus on Nov 28, 2020, 06:42 AM
Post here error
Title: Re: [GAMEMODE]DeathMatch v1.1
Post by: shaddam17 on Dec 19, 2020, 07:50 PM
How does the banning system work? It says the player is banned, but he can come back, he only receives a kick
Title: Re: [GAMEMODE]DeathMatch v1.1
Post by: UncleRus on Dec 20, 2020, 06:13 PM
Quote from: shaddam17 on Dec 19, 2020, 07:50 PMHow does the banning system work? It says the player is banned, but he can come back, he only receives a kick
You can take screenshoot this problem?
Title: Re: [GAMEMODE]DeathMatch v1.1
Post by: shaddam17 on Dec 22, 2020, 12:15 AM
Well...
(https://pbs.twimg.com/media/Epnd9uOW8AASm4q?format=jpg&name=medium)

The guy had a mental meltdown. When I banned him it was literally just a kick.He could reconnect with even the same name/UID However there is his uid line in the bans db

[noae]Player 'MuXsT' ID 0 connected.
Player 'Szondikapitany' ID 1 connected.
Disconnecting player 'MuXsT' at ID 0, sent quit packet with reason 1.
Player 'MuXsT' ID 0 disconnected.
Disconnecting player 'Szondikapitany' at ID 1, sent quit packet with reason 1.
Player 'Szondikapitany' ID 1 disconnected.
Player 'Grozav' ID 0 connected.
Player 'Szondikapitany' ID 1 connected.
Disconnecting player 'Szondikapitany' at ID 1, sent quit packet with reason 1.
Player 'Szondikapitany' ID 1 disconnected.
Player 'Szondikapitany' ID 1 connected.
Kicking connecting player at ID 2, name already in use.
Kicking connecting player at ID 2, name already in use.
Kicking connecting player at ID 2, name already in use.
Player 'Szondikapitany.' ID 2 connected.
Player 'Szondikapitany.' ID 2 disconnected (kicked).
Disconnecting player 'Grozav' at ID 0, sent quit packet with reason 1.
Player 'Grozav' ID 0 disconnected.
Player 'Grozav' ID 0 connected.
Disconnecting player 'Grozav' at ID 0, sent quit packet with reason 1.
Player 'Grozav' ID 0 disconnected.
Player 'FatherofSzondi' ID 0 connected.
Player 'FatherofSzondi' ID 0 disconnected (kicked).
Player 'UnfairShit' ID 0 connected.
Player 'UnfairShit' ID 0 disconnected (kicked).
Player 'iKnowyourHouse' ID 0 connected.
Player 'iKnowyourHouse' ID 0 disconnected (kicked).
Player 'iWillVisitYou' ID 0 connected.
Player 'iWillVisitYou' ID 0 disconnected (kicked).
Player 'soon_very_soon' ID 0 connected.
Player 'soon_very_soon' ID 0 disconnected (kicked).
Player 'prepareYour.anus' ID 0 connected.
Player 'prepareYour.anus' ID 0 disconnected (kicked).
Player 'HungarianKid' ID 0 connected.
Player 'HungarianKid' ID 0 disconnected (kicked).
Player 'Noob[Hun' ID 0 connected.
Player 'Noob[Hun' ID 0 disconnected (kicked).
Player 'iRapeYou' ID 0 connected.
Player 'iRapeYou' ID 0 disconnected (kicked).
Player 'DDOS' ID 0 connected.
Player 'DDOS' ID 0 disconnected (kicked).
Player 'dos' ID 0 connected.
Player 'dos' ID 0 disconnected (kicked).
Player 'bitchaaas' ID 0 connected.
Player 'bitchaaas' ID 0 disconnected (kicked).
Player 'Lady' ID 0 connected.
Player 'Lady' ID 0 disconnected (kicked).
Player 'Simpmeister' ID 0 connected.
Player 'Simpmeister' ID 0 disconnected (kicked).
Player 'heizter' ID 0 connected.
Player 'MuXsT' ID 2 connected.
Disconnecting player 'MuXsT' at ID 2, sent quit packet with reason 1.
Player 'MuXsT' ID 2 disconnected.
Player 'arbamoney' ID 2 connected.
Disconnecting player 'arbamoney' at ID 2, sent quit packet with reason 1.
Player 'arbamoney' ID 2 disconnected.
Disconnecting player 'heizter' at ID 0, sent quit packet with reason 1.
Player 'heizter' ID 0 disconnected.
Player 'Dusanbajev' ID 0 connected.
Player 'Dusanbajev' ID 0 disconnected (kicked).
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Player 'KURVAANYAD' ID 0 connected.
Player 'KURVAANYAD' ID 0 disconnected (kicked).
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Player 'DAGADT_GECI' ID 0 connected.
Player 'DAGADT_GECI' ID 0 disconnected (kicked).
Player 'papaszemes' ID 0 connected.
Player 'papaszemes' ID 0 disconnected (kicked).
Player 'Fogyjal_le' ID 0 connected.
Player 'Fogyjal_le' ID 0 disconnected (kicked).
Player 'VRLice' ID 0 connected.
Player 'VRLice' ID 0 disconnected (kicked).
Disconnecting player 'Szondikapitany' at ID 1, sent quit packet with reason 1.
Player 'Szondikapitany' ID 1 disconnected.
Player 'MEGDOGLESZ' ID 0 connected.
Disconnecting player 'MEGDOGLESZ' at ID 0, sent quit packet with reason 1.
Player 'MEGDOGLESZ' ID 0 disconnected.
Player 'Szondikapitany' ID 0 connected.
[/noae]

(https://i.imgur.com/fSMYRJt.jpg)


My solution for now is a windows firewall rule. Not elegant but working
Title: Re: [GAMEMODE]DeathMatch v1.1
Post by: SHy^ on Dec 22, 2020, 11:08 AM
Quote from: shaddam17 on Dec 22, 2020, 12:15 AMWell...
(https://pbs.twimg.com/media/Epnd9uOW8AASm4q?format=jpg&name=medium)

The guy had a mental meltdown. When I banned him it was literally just a kick.He could reconnect with even the same name/UID However there is his uid line in the bans db

[noae][noae][noae][noae][noae]Player 'MuXsT' ID 0 connected.
Player 'Szondikapitany' ID 1 connected.
Disconnecting player 'MuXsT' at ID 0, sent quit packet with reason 1.
Player 'MuXsT' ID 0 disconnected.
Disconnecting player 'Szondikapitany' at ID 1, sent quit packet with reason 1.
Player 'Szondikapitany' ID 1 disconnected.
Player 'Grozav' ID 0 connected.
Player 'Szondikapitany' ID 1 connected.
Disconnecting player 'Szondikapitany' at ID 1, sent quit packet with reason 1.
Player 'Szondikapitany' ID 1 disconnected.
Player 'Szondikapitany' ID 1 connected.
Kicking connecting player at ID 2, name already in use.
Kicking connecting player at ID 2, name already in use.
Kicking connecting player at ID 2, name already in use.
Player 'Szondikapitany.' ID 2 connected.
Player 'Szondikapitany.' ID 2 disconnected (kicked).
Disconnecting player 'Grozav' at ID 0, sent quit packet with reason 1.
Player 'Grozav' ID 0 disconnected.
Player 'Grozav' ID 0 connected.
Disconnecting player 'Grozav' at ID 0, sent quit packet with reason 1.
Player 'Grozav' ID 0 disconnected.
Player 'FatherofSzondi' ID 0 connected.
Player 'FatherofSzondi' ID 0 disconnected (kicked).
Player 'UnfairShit' ID 0 connected.
Player 'UnfairShit' ID 0 disconnected (kicked).
Player 'iKnowyourHouse' ID 0 connected.
Player 'iKnowyourHouse' ID 0 disconnected (kicked).
Player 'iWillVisitYou' ID 0 connected.
Player 'iWillVisitYou' ID 0 disconnected (kicked).
Player 'soon_very_soon' ID 0 connected.
Player 'soon_very_soon' ID 0 disconnected (kicked).
Player 'prepareYour.anus' ID 0 connected.
Player 'prepareYour.anus' ID 0 disconnected (kicked).
Player 'HungarianKid' ID 0 connected.
Player 'HungarianKid' ID 0 disconnected (kicked).
Player 'Noob[Hun' ID 0 connected.
Player 'Noob[Hun' ID 0 disconnected (kicked).
Player 'iRapeYou' ID 0 connected.
Player 'iRapeYou' ID 0 disconnected (kicked).
Player 'DDOS' ID 0 connected.
Player 'DDOS' ID 0 disconnected (kicked).
Player 'dos' ID 0 connected.
Player 'dos' ID 0 disconnected (kicked).
Player 'bitchaaas' ID 0 connected.
Player 'bitchaaas' ID 0 disconnected (kicked).
Player 'Lady' ID 0 connected.
Player 'Lady' ID 0 disconnected (kicked).
Player 'Simpmeister' ID 0 connected.
Player 'Simpmeister' ID 0 disconnected (kicked).
Player 'heizter' ID 0 connected.
Player 'MuXsT' ID 2 connected.
Disconnecting player 'MuXsT' at ID 2, sent quit packet with reason 1.
Player 'MuXsT' ID 2 disconnected.
Player 'arbamoney' ID 2 connected.
Disconnecting player 'arbamoney' at ID 2, sent quit packet with reason 1.
Player 'arbamoney' ID 2 disconnected.
Disconnecting player 'heizter' at ID 0, sent quit packet with reason 1.
Player 'heizter' ID 0 disconnected.
Player 'Dusanbajev' ID 0 connected.
Player 'Dusanbajev' ID 0 disconnected (kicked).
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Player 'KURVAANYAD' ID 0 connected.
Player 'KURVAANYAD' ID 0 disconnected (kicked).
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Player 'DAGADT_GECI' ID 0 connected.
Player 'DAGADT_GECI' ID 0 disconnected (kicked).
Player 'papaszemes' ID 0 connected.
Player 'papaszemes' ID 0 disconnected (kicked).
Player 'Fogyjal_le' ID 0 connected.
Player 'Fogyjal_le' ID 0 disconnected (kicked).
Player 'VRLice' ID 0 connected.
Player 'VRLice' ID 0 disconnected (kicked).
Disconnecting player 'Szondikapitany' at ID 1, sent quit packet with reason 1.
Player 'Szondikapitany' ID 1 disconnected.
Player 'MEGDOGLESZ' ID 0 connected.
Disconnecting player 'MEGDOGLESZ' at ID 0, sent quit packet with reason 1.
Player 'MEGDOGLESZ' ID 0 disconnected.
Player 'Szondikapitany' ID 0 connected.
[/noae][/noae][/noae][/noae][/noae]

(https://i.imgur.com/fSMYRJt.jpg)


My solution for now is a windows firewall rule. Not elegant but working
Try changing the CheckBan function to this:
[noae][noae][noae]function CheckBan(plr)
{
local q = QuerySQL(Bans, format("SELECT * FROM Bans WHERE UniqueID = '%s'", plr.UniqueID));
if (q) {
MessagePlayer("[#95fcff]INFO > [#E0E0E0]You're banned from the server. Reason:"+GetSQLColumnData(q, 1), plr);
plr.Kick(); }else return 0;
}
[/noae][/noae]

P.S: Remove the if statement from onPlayerJoin function. Also that's how a common ban system works. It checks the banned player's UID inputed into the database and if the UID exists, it kicks the player.
Title: Re: [GAMEMODE]DeathMatch v1.1
Post by: shaddam17 on Dec 23, 2020, 08:12 AM
I tried it yesterday, but no change. The banned person can reconnect

Player 'TakeshiKovacs' ID 0 disconnected (kicked).
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Player 'TakeshiKovacs' ID 0 connected.

AN ERROR HAS OCCURED [the index 'UniqueID' does not exist]

CALLSTACK
*FUNCTION [GetInfo()] scripts/main.nut line [398]
*FUNCTION [onPlayerJoin()] scripts/function.nut line [150]

LOCALS
[p] USERPOINTER
[q] USERPOINTER
[player] INSTANCE
[this] TABLE
[country] "Hungary"
[player] INSTANCE
[this] TABLE

(https://i.imgur.com/bnuhdtp.jpg)
(https://i.imgur.com/khJFxu7.jpg)
Title: Re: [GAMEMODE]DeathMatch v1.1
Post by: habi on Dec 23, 2020, 08:51 AM
You may not pass 'player' to functions.

GetInfo(player) change to GetInfo(player. ID)

because by the time it reaches function,  the player might disconnected and error happens
Title: Re: [GAMEMODE]DeathMatch v1.1
Post by: SHy^ on Dec 23, 2020, 09:58 AM
Quote from: shaddam17 on Dec 23, 2020, 08:12 AMI tried it yesterday, but no change. The banned person can reconnect

Player 'TakeshiKovacs' ID 0 disconnected (kicked).
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Kicking player ID 0, no record of such connection ID exists.
Player 'TakeshiKovacs' ID 0 connected.

AN ERROR HAS OCCURED [the index 'UniqueID' does not exist]

CALLSTACK
*FUNCTION [GetInfo()] scripts/main.nut line [398]
*FUNCTION [onPlayerJoin()] scripts/function.nut line [150]

LOCALS
[p] USERPOINTER
[q] USERPOINTER
[player] INSTANCE
[this] TABLE
[country] "Hungary"
[player] INSTANCE
[this] TABLE

(https://i.imgur.com/bnuhdtp.jpg)
(https://i.imgur.com/khJFxu7.jpg)
If the banned player reconnects, does the server kick him because of being banned?

Also try what @habi said. Pass the player's ID to the function and then create a local var with FindPlayer(player.ID) and then continue with an if statement.
Title: Re: [GAMEMODE]DeathMatch v1.1
Post by: Xmair on Dec 23, 2020, 05:54 PM
Quote from: habi on Dec 23, 2020, 08:51 AMYou may not pass 'player' to functions.

GetInfo(player) change to GetInfo(player. ID)

because by the time it reaches function,  the player might disconnected and error happens
As far as I know, the server is single threaded and it's not going to release the player's information until your onPlayerPart event is completed.

:edit: I just took a look at the script, there's no "UniqueID" member in the PlayerClass, you need to add it manually. Though there seem to be a ton of other issues in the script and I personally wouldn't recommend using this :/
Title: Re: [GAMEMODE]DeathMatch v1.1
Post by: SHy^ on Dec 23, 2020, 06:31 PM
Quote from: Xmair on Dec 23, 2020, 05:54 PM
Quote from: habi on Dec 23, 2020, 08:51 AMYou may not pass 'player' to functions.

GetInfo(player) change to GetInfo(player. ID)

because by the time it reaches function,  the player might disconnected and error happens
As far as I know, the server is single threaded and it's not going to release the player's information until your onPlayerPart event is completed.

:edit: I just took a look at the script, there's no "UniqueID" member in the PlayerClass, you need to add it manually. Though there seem to be a ton of other issues in the script and I personally wouldn't recommend using this :/
True, the script is more than 85% copy pastable of snippets released in forum and seems to be roughly made/modified.
Title: Re: [GAMEMODE]DeathMatch v1.1
Post by: UncleRus on Dec 24, 2020, 09:01 PM
Quote from: Xmair on Dec 23, 2020, 05:54 PM
Quote from: habi on Dec 23, 2020, 08:51 AMYou may not pass 'player' to functions.

GetInfo(player) change to GetInfo(player. ID)

because by the time it reaches function,  the player might disconnected and error happens
As far as I know, the server is single threaded and it's not going to release the player's information until your onPlayerPart event is completed.

:edit: I just took a look at the script, there's no "UniqueID" member in the PlayerClass, you need to add it manually. Though there seem to be a ton of other issues in the script and I personally wouldn't recommend using this :/
do your project "I do not recommend this script" but I do not care at all! for me it is to gain experience and do it better for others