Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - SHy^

#1
SIMPLE base-capturing game mode. I coded this in late 2020 and this script was still a work in progress. This is not a complete script with all the features; it's quite simple because it is an abandoned work. If you want to continue my work or host this script on your own server, you're more than welcome. The only catch is you should NOT remove the credits. Let the credits stay if you want to use this script. Thanks for reading!

https://github.com/thearcherr/base-capture

Screenshots:





Bugs may be imminent.

Note: You need to install decUI scripts in your store/script folder for UI to work. (I didn't upload because I'm lazy af).

Other credits:
@NewK for his awesome decUI
SLC- Password strength and other functions
@umar4911 - fonts

(Also includes the credits for skins to their respective owners)
#3
Isn't onPickupClaimPicked(player, pickup) the function when a player exists the pickup?
#4
Quote from: Mr.Dip 2020 on Dec 29, 2020, 06:05 PMhave you tested the command before posting it?
Have you seen when the topic was made and thought for a second before bumping?
#5
Quote from: Ahmed_Samir on Dec 27, 2020, 12:12 AM
Quote from: AdTec_224 on Dec 25, 2020, 12:17 AMlibpng16.dll is included with the client update (as seen here) so either something/someone deleted it or it may require the Visual Studio redistributable to be installed, located here.
can you send me your libpng16 file please?
Install the dll file from here(Clicky!). I'll tell you the quick way to paste the file.

- Download the file from above link.

- Right click on VC:MP browser.

- Choose 'Open file location'.

- You'll see a '04rel006' folder. Open it.

- Finally paste the .dll

- Try joining servers now!

It worked for a few users who were still facing the issue after downloading VC redistributables.
#6
Quote from: Ahmed_Samir on Dec 26, 2020, 04:33 PMi can't fix it untill now
Did you try installing the VC redistributables here(Click this text)?

It has fixed the same issue you're facing for almost every player who got this issue. Seems like you didn't install them. Please install them and try running VC:MP again. Let us know then. :)

:edit: If that doesn't work, install the dll file from here(Clicky!). I'll tell you the quick way to paste the file.

Steps:
- Download the file from above link.

- Right click on VC:MP browser.

- Choose 'Open file location'.

- You'll see a '04rel006' folder. Open it.

- Finally paste the .dll

- Try joining servers now!

It worked for a few users who were still facing the issue after download VC redistributables.
#7
He has fixed the issue. Met him ingame.
#8
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.
#9
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



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.
#10
Quote from: shaddam17 on Dec 22, 2020, 12:15 AMWell...


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]




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.
#11
Awesome! Unusual animation.
#12
Quote from: Kenneth Law on Nov 24, 2020, 02:41 PMBump, the same question as I want to ask.
You already got the answer above. Change the player's world and all the markers will hide. Maybe that's the only way..
#13
Quote from: KX on Nov 23, 2020, 01:46 AMbut why OnTimeChange when we can use a timer? I guess doing same thing with a timer is same unless you hate "newtimer" word :P
Perhaps, he posted a example to let others know how the function can be useful like timer..
#14
Quote from: Inferno on Nov 20, 2020, 08:05 AM
Quote from: Shy on Nov 20, 2020, 08:01 AMhttp://wiki.adtec.ovh/wiki/Scripting/Squirrel/Functions/NewTimer

http://wiki.adtec.ovh/wiki/OnPlayerMove

Assign a value to player when he types /heal, and use the OnPlayerMove function, and make the value false and return a message to player "You moved!".

Event OnPlayerMove is a bad idea to use.

Using variables to store pos and detect after 5 seconds is more effective.


Also just as Dizzaster said,
You are not seeming to try anything.

Do it stepwise to learn better.
Start with an empty test cmd.
Make it simple heal cmd.
Add cash function in it.
Then make it fail if player moves.
Make it for 5 seconds. Etc



An example is.


else if(cmd == "help") { // simple
MessagePlayer("[#ffffff] How may i help you ",player);
return 0;
}

else if(cmd == "bighelp") { // with cash function.
if(player.Cash < 100) return MessagePlayer(" No money no honey ",player);
player.Cash -= 100;
MessagePlayer(" How may i help you sir ",player);
return 0;
}

else if(cmd == "heal") { // simplest heal command
if(player.Health < 100) return player.Health = 100;
else if(player.Health == 100) return MessagePlayer(" You dont need to be healed ",player);
return 0;
}
Nothing is bad unless it's used in a bad way. I guess you were talking about that if you assign the player a value, check it if it's true and make it false with a error message onplayermove event and player instantly types /heal again, he'll be healed in a sec or two. Yes, this is actually bad. But if you do this:
 heal <- NewTimer("healplayer", 5000, 1, player.ID);
onPlayerMove:
heal.Stop();
Message("you moved..");
then it isn't bad. It is same as for timers. If you use timers in a bad way, they won't work like expected.. Both ways are good if used correctly and bad if used in a bad way :)
#15
http://wiki.adtec.ovh/wiki/Scripting/Squirrel/Functions/NewTimer

http://wiki.adtec.ovh/wiki/OnPlayerMove

Assign a value to player when he types /heal, and use the OnPlayerMove function, and make the value false and return a message to player "You moved!".