Recent posts

#31
----------> JUMP DETECTION <----------

function IsJumping(p) {
if(p.Action == 41) return 1; // (true)
else return 0; // (false)
}

----------> JUMP EXAMPLE CODE USAGE <----------

function onPlayerMove(player, lastX, lastY, lastZ, newX, newY, newZ){
if(IsJumping(player)){
player.Speed.z += 1;   // E---X---A---M---P---L---E
}
}


_________________________________________


----------> FALL DETECTION <----------

function IsFalling(p, Znew, Zlast) {
if(IsJumping(p)) return false;
if(Znew == Zlast) return false; // rarely happens if the player is continually moving, since you can barely find a straightforward surface so Z positions are almost always dynamic
local newZlower = (Znew < Zlast ? true : false);
if(newZlower) {
if(Zlast - Znew < 0.15) return false; // Not Falling (e.g, 11.3 - 11.2 = 0.1 is not a fall)
else return true; // > 0.15 is a fall (Approximate numbers - I didn't really calculate it precisely)
}
else {return false;} // Znew is bigger -> so climbing or going up somehow
}

----------> FALLING EXAMPLE CODE USAGE <----------
function onPlayerMove(player, lastX, lastY, lastZ, newX, newY, newZ){
if(IsFalling(player, newZ, lastZ)) player.Immunity = 32; // E---X---A---M---P---L---E
}


Lastly, what you have to do (The code's user) is to make sure about the value (0.15) accuracy by testing it out in ur server, so I will adjust it here accordingly, or I might test it later and find out the precise value.
#32
Support / Re: onPlayerMove but in client...
Last post by (vG)DesTroYeR^ - Oct 23, 2025, 09:50 AM
Quote from: Xmair on Oct 22, 2025, 08:53 PMYou could use Script::ScriptProcess

this doesn't have the desired parameters, I am already tracking player's position via Server::ServerData(stream); function, I guess that if there's a function like on player move would be precise
#33
General Discussion / Win a Prize Worth Up to $100,0...
Last post by Pavonis - Oct 23, 2025, 05:30 AM
iPhone 17, gaming laptops, gift cards, crypto & more!
Join now: https://telegra.ph/Get-a-gift-worth-up-to-10000077-10-23-1478
#34
General Discussion / Win a Prize Worth Up to $100,0...
Last post by Pavonis - Oct 23, 2025, 05:29 AM
iPhone 17, gaming laptops, gift cards, crypto & more!
Join now: https://telegra.ph/Get-a-gift-worth-up-to-10000077-10-23-1114
#35
Support / Re: onPlayerMove but in client...
Last post by Xmair - Oct 22, 2025, 08:53 PM
You could use Script::ScriptProcess
#36
Client Scripting / Re: Client script for my serve...
Last post by (vG)DesTroYeR^ - Oct 22, 2025, 08:06 PM
man for fuck's sake - stop using chatgpt
you are a newbie and i know u well, that script isnt even logical and seems to be faulty (chatgpt written)

go learn scripting instead of braging about gpt shithole codes
#37
Support / onPlayerMove but in client sid...
Last post by (vG)DesTroYeR^ - Oct 22, 2025, 07:09 PM
My friend @gamingpro told me that there's a function in client side written like this:
function Player::PlayerMove(oldpos, newpos){
}

But I am not sure of this, can someone tell me if there's a function like this in client side? Sending high rate timers to client side frequently is laggy -> not only is it lagging for the sprite angle degrees im sending but is also cpu-bound of the panel.

I am now using local player = World.findlocalplayer(); // player.Position vector ---  but it needs more precision to get rid of lag, thats why im searching for a function like playermove in server side.

I basically want it works same as Player's default tag name that incessantly follows him precisely
#38
Support / Re: Client side urgent help ne...
Last post by (vG)DesTroYeR^ - Oct 22, 2025, 11:50 AM
Quote from: vitovc on Oct 21, 2025, 03:44 PMthere is no clientside player.Angle but you can 1) get it from server (with lag) with Stream function 2) or you can guess player's camera angle (it almost same as player.Angle when player is not looking back)

get_angle <- function(x, y, x2, y2){
  return ::atan2(y2 - y, x2 - x);
}
get_player_angle <- function(){
  local screen_size = ::GUI.GetScreenSize();
  local cam_from = ::GUI.ScreenPosToWorld(::Vector(screen_size.X * 0.5, screen_size.Y * 0.5, -1));
  local cam_to = ::GUI.ScreenPosToWorld(::Vector(screen_size.X * 0.5, screen_size.Y * 0.5, 1));
  return ::get_angle(cam_from.X, cam_from.Y, cam_to.X, cam_to.Y);
}
untested, I took code from Get player Camera zoom
local angle = ::get_player_angle();also maybe you will need to add some offset to result of angle to make it similar as serverside angle, to do it correctly use
normalize_angle <- function (a){
  return ::atan2(::sin(a), ::cos(a));
}

::normalize_angle(angle + 1.57079);

i was trying to develop an MVP Trophy tag above player's name tag, it keeps following him as long as he moves, i firstly had some issues regarding angle
but i took GetAngleFromDeg() function from forums and from the server side(Angles there in radians, -3.14 to 3.14) I sent to client side and did some offset according to degree angle, it is now good. But i wish if there were a ready to use angle index.
- ty for help thats useful
#39
Servers / Re: [PTB] - Plant the Bomb
Last post by (vG)DesTroYeR^ - Oct 21, 2025, 08:27 PM
# PTB v2.0

- Added:
MVP sprite for the TOP player of the current round as a tag which incessantly follow him as long as they move.
- Added:
Miscellaneous commands and fixed old ones.
- Updated:
Lobby Welcome sprite into a better appearance.
- Added:
Score message when round ends (Doesnt show when attackers win by planting).
- Changed:
IP address to **49.12.82.39:19156**.
- Fixed:
Voting timer redundancy, it now works systematically.
- Added:
New weapon UI as a packlist for weapons.
- Adjusted:
Pack system: you can now click on keys to claim the desired pack.
- Added:
New rules UI as a list of rules.
#40
Support / Re: Client side urgent help ne...
Last post by vitovc - Oct 21, 2025, 03:44 PM
there is no clientside player.Angle but you can 1) get it from server (with lag) with Stream function 2) or you can guess player's camera angle (it almost same as player.Angle when player is not looking back)

get_angle <- function(x, y, x2, y2){
  return ::atan2(y2 - y, x2 - x);
}
get_player_angle <- function(){
  local screen_size = ::GUI.GetScreenSize();
  local cam_from = ::GUI.ScreenPosToWorld(::Vector(screen_size.X * 0.5, screen_size.Y * 0.5, -1));
  local cam_to = ::GUI.ScreenPosToWorld(::Vector(screen_size.X * 0.5, screen_size.Y * 0.5, 1));
  return ::get_angle(cam_from.X, cam_from.Y, cam_to.X, cam_to.Y);
}
untested, I took code from Get player Camera zoom
local angle = ::get_player_angle();also maybe you will need to add some offset to result of angle to make it similar as serverside angle, to do it correctly use
normalize_angle <- function (a){
  return ::atan2(::sin(a), ::cos(a));
}

::normalize_angle(angle + 1.57079);