Raised This Month: $ Target: $400
 0% 

[ANY] Bring/GoTo [UPDATED 2/6/2017]


Post New Thread Reply   
 
Thread Tools Display Modes
PLTAT
Member
Join Date: Apr 2023
Old 05-30-2024 , 17:54   Re: [ANY] Bring/GoTo [UPDATED 2/6/2017]
Reply With Quote #31

// warning 209: function has explicit 'int' tag but does not return a value
// 180 | public int MainMenu_CallBack(Menu menu, MenuAction action, int param1, int param2)
// --------------------^
//
// warning 209: function has explicit 'int' tag but does not return a value
// 230 | public int BringMenu_CallBack(Menu menu, MenuAction action, int param1, int param2)
// --------------------^
//
// warning 209: function has explicit 'int' tag but does not return a value
// 298 | public int GoToMenu_Callback(Menu menu, MenuAction action, int param1, int param2)
__________________
---- Signature Start ----
Web not i18n
My English poor
---- Signature End ----
PLTAT is offline
Grey83
Veteran Member
Join Date: Dec 2014
Location: Ukraine
Old 05-31-2024 , 02:51   Re: [ANY] Bring/GoTo [UPDATED 2/6/2017]
Reply With Quote #32

Quote:
Originally Posted by PLTAT View Post
warning 209: function has explicit 'int' tag but does not return a value
public int AnyMenuCallback(Menu menu, MenuAction action, int param1, int param2)
This warning began to appear only starting from SM1.11 and can be fixed by simply adding "return 0;" before the closing curly brace of the menu callback function.
__________________

Last edited by Grey83; 05-31-2024 at 02:53.
Grey83 is offline
PLTAT
Member
Join Date: Apr 2023
Old 05-31-2024 , 20:00   Re: [ANY] Bring/GoTo [UPDATED 2/6/2017]
Reply With Quote #33

Quote:
Originally Posted by Grey83 View Post
This warning began to appear only starting from SM1.11 and can be fixed by simply adding "return 0;" before the closing curly brace of the menu callback function.

----
you code
--
// error 437: functions in global scope must use braces
// 157 | public Action:OffNoBlockPlayer(Handle:timer, any:target) SetEntData(target, g_CollisionOffset, 5, 4, true);
// ----------------------------------------------------------------^
//
// error 122: expected type expression
// 157 | public Action:OffNoBlockPlayer(Handle:timer, any:target) SetEntData(target, g_CollisionOffset, 5, 4, true);
//
// --------------------------------------------------------------------------------------------------------------^
// warning 234: symbol "GetMaxClients" is marked as deprecated: Use MaxClients variable instead.
// 176 | for (new i = 1; i <= GetMaxClients(); i++)
// --------------------------------------------^
//
// warning 234: symbol "GetMaxClients" is marked as deprecated: Use MaxClients variable instead.
// 250 | for (new i = 1; i <= GetMaxClients(); i++)
// --------------------------------------------^
//
// warning 234: symbol "GetMaxClients" is marked as deprecated: Use MaxClients variable instead.
// 267 | for (new i = 1; i <= GetMaxClients(); i++)
// --------------------------------------------^
//
// warning 234: symbol "GetMaxClients" is marked as deprecated: Use MaxClients variable instead.
// 284 | for (new i = 1; i <= GetMaxClients(); i++)
// --------------------------------------------^
//
// warning 234: symbol "GetMaxClients" is marked as deprecated: Use MaxClients variable instead.
// 301 | for (new i = 1; i <= GetMaxClients(); i++)
// --------------------------------------------^
//
// warning 234: symbol "GetMaxClients" is marked as deprecated: Use MaxClients variable instead.
// 321 | for (new i = 1; i <= GetMaxClients(); i++)
// ---------------------------------------------^
//
// warning 234: symbol "GetMaxClients" is marked as deprecated: Use MaxClients variable instead.
// 350 | for (new i = 1; i <= GetMaxClients(); i++)
// ---------------------------------------------^
//
// warning 234: symbol "GetMaxClients" is marked as deprecated: Use MaxClients variable instead.
// 382 | for (new i = 1; i <= GetMaxClients(); i++)
// ---------------------------------------------^
//
// warning 234: symbol "GetMaxClients" is marked as deprecated: Use MaxClients variable instead.
// 414 | for (new i = 1; i <= GetMaxClients(); i++)
// ---------------------------------------------^
//
// warning 234: symbol "GetMaxClients" is marked as deprecated: Use MaxClients variable instead.
// 424 | for (new k = 1; k <= GetMaxClients(); k++)
// ------------------------------------------------^
//
// warning 234: symbol "GetMaxClients" is marked as deprecated: Use MaxClients variable instead.
// 452 | for (new i = 1; i <= GetMaxClients(); i++)
// ---------------------------------------------^
//
// warning 234: symbol "GetMaxClients" is marked as deprecated: Use MaxClients variable instead.
// 476 | return entity > GetMaxClients() || !entity;
// ---------------------------------------^
--
i try fix
meta2.0_1293+sm1.12_7137
Attached Files
File Type: sp Get Plugin or Get Source (sm_telemanager.sp - 58 views - 19.5 KB)
__________________
---- Signature Start ----
Web not i18n
My English poor
---- Signature End ----

Last edited by PLTAT; 05-31-2024 at 21:02.
PLTAT is offline
PLTAT
Member
Join Date: Apr 2023
Old 05-31-2024 , 20:26   Re: [ANY] Bring/GoTo [UPDATED 2/6/2017]
Reply With Quote #34

Quote:
Originally Posted by Grey83 View Post
This warning began to appear only starting from SM1.11 and can be fixed by simply adding "return 0;" before the closing curly brace of the menu callback function.

----
thank Grey83
meta2.0_1293+sm1.12_7137
--
but this code well move, sometime in the wall
how just in target point, not move
Attached Files
File Type: sp Get Plugin or Get Source (hl_goto.sp - 53 views - 12.0 KB)
__________________
---- Signature Start ----
Web not i18n
My English poor
---- Signature End ----

Last edited by PLTAT; 05-31-2024 at 20:44.
PLTAT is offline
Grey83
Veteran Member
Join Date: Dec 2014
Location: Ukraine
Old 06-01-2024 , 03:00   Re: [ANY] Bring/GoTo [UPDATED 2/6/2017]
Reply With Quote #35

Quote:
Originally Posted by PLTAT View Post
but this code well move, sometime in the wall
how just in target point, not move
To teleport to the aiming point, you can use the following code so that the player does not get stuck in the wall:
PHP Code:
    static float ang[3], pos[3], vec[3], start[3];
    
GetClientEyePosition(clientpos);
    
GetClientEyeAngles(clientang);

    
Handle trace TR_TraceRayFilterEx(posangMASK_SHOTRayType_InfiniteTraceEntityFilterPlayer);
    if(
TR_DidHit(trace))
    {
        
TR_GetEndPosition(starttrace);

        
GetVectorDistance(posstartfalse);
        
GetAngleVectors(angvecNULL_VECTORNULL_VECTOR);
        
start[0] -= 35 vec[0];
        
start[1] -= 35 vec[1];
        
start[2] -= 35 vec[2];

        
GetClientAbsOrigin(clientpos);

        
TeleportEntity(clientstartNULL_VECTORNULL_VECTOR);

        
GetClientMins(clientvec);
        
GetClientMaxs(clientang);
        
TR_TraceHullFilter(startstartvecangMASK_PLAYERSOLIDTraceEntityFilterPlayerclient);
        if(
TR_DidHit())
        {
            
CloseHandle(trace);
            
TeleportEntity(clientposNULL_VECTORNULL_VECTOR);
            return;
        }
    }
    
CloseHandle(trace); 
__________________

Last edited by Grey83; 06-01-2024 at 03:00.
Grey83 is offline
Grey83
Veteran Member
Join Date: Dec 2014
Location: Ukraine
Old 06-01-2024 , 06:55   Re: [ANY] Bring/GoTo [UPDATED 2/6/2017]
Reply With Quote #36

Quote:
Originally Posted by PLTAT View Post
your code
...
i try fix
meta2.0_1293+sm1.12_7137
Rewrote completely in new syntax, also did some code optimization.
SM1.11:
PHP Code:
//// sm_telemanager 1.0.0.sp
//
// Z:\sm_telemanager 1.0.0.sp(74) : warning 234: symbol "FCVAR_PLUGIN" is marked as deprecated: No logic using this flag ever existed in a released game. It only ever appeared in the first hl2sdk.
// Z:\sm_telemanager 1.0.0.sp(75) : warning 234: symbol "FCVAR_PLUGIN" is marked as deprecated: No logic using this flag ever existed in a released game. It only ever appeared in the first hl2sdk.
// Z:\sm_telemanager 1.0.0.sp(176) : warning 234: symbol "GetMaxClients" is marked as deprecated: Use MaxClients variable instead.
// Z:\sm_telemanager 1.0.0.sp(250) : warning 234: symbol "GetMaxClients" is marked as deprecated: Use MaxClients variable instead.
// Z:\sm_telemanager 1.0.0.sp(267) : warning 234: symbol "GetMaxClients" is marked as deprecated: Use MaxClients variable instead.
// Z:\sm_telemanager 1.0.0.sp(284) : warning 234: symbol "GetMaxClients" is marked as deprecated: Use MaxClients variable instead.
// Z:\sm_telemanager 1.0.0.sp(301) : warning 234: symbol "GetMaxClients" is marked as deprecated: Use MaxClients variable instead.
// Z:\sm_telemanager 1.0.0.sp(321) : warning 234: symbol "GetMaxClients" is marked as deprecated: Use MaxClients variable instead.
// Z:\sm_telemanager 1.0.0.sp(350) : warning 234: symbol "GetMaxClients" is marked as deprecated: Use MaxClients variable instead.
// Z:\sm_telemanager 1.0.0.sp(382) : warning 234: symbol "GetMaxClients" is marked as deprecated: Use MaxClients variable instead.
// Z:\sm_telemanager 1.0.0.sp(414) : warning 234: symbol "GetMaxClients" is marked as deprecated: Use MaxClients variable instead.
// Z:\sm_telemanager 1.0.0.sp(424) : warning 234: symbol "GetMaxClients" is marked as deprecated: Use MaxClients variable instead.
// Z:\sm_telemanager 1.0.0.sp(452) : warning 234: symbol "GetMaxClients" is marked as deprecated: Use MaxClients variable instead.
// Z:\sm_telemanager 1.0.0.sp(476) : warning 234: symbol "GetMaxClients" is marked as deprecated: Use MaxClients variable instead.
// Code size:         24704 bytes
// Data size:         27744 bytes
// Stack/heap size:      16968 bytes
// Total requirements:   69416 bytes
//
// 14 Warnings.
//
// Compilation Time: 0,44 sec
// ----------------------------------------

//// sm_telemanager 1.1.0_01.06.2024.sp
//
// Code size:         23644 bytes
// Data size:         26800 bytes
// Stack/heap size:      16724 bytes
// Total requirements:   67168 bytes
//
// Compilation Time: 0,33 sec
// ---------------------------------------- 
SM1.12:
PHP Code:
//// sm_telemanager 1.1.0_01.06.2024.sp
//
// Code size:         23652 bytes
// Data size:         26800 bytes
// Stack/heap size:      16724 bytes
// Total requirements:   67176 bytes
//
// Compilation Time: 0,33 sec
// ---------------------------------------- 
Attached Files
File Type: sp Get Plugin or Get Source (sm_telemanager 1.1.0_01.06.2024.sp - 48 views - 18.3 KB)
__________________

Last edited by Grey83; 06-01-2024 at 06:57.
Grey83 is offline
PLTAT
Member
Join Date: Apr 2023
Old 06-02-2024 , 02:05   Re: [ANY] Bring/GoTo [UPDATED 2/6/2017]
Reply With Quote #37

Quote:
Originally Posted by Grey83 View Post
To teleport to the aiming point, you can use the following code so that the player does not get stuck in the wall:
PHP Code:
    static float ang[3], pos[3], vec[3], start[3];
    
GetClientEyePosition(clientpos);
    
GetClientEyeAngles(clientang);

    
Handle trace TR_TraceRayFilterEx(posangMASK_SHOTRayType_InfiniteTraceEntityFilterPlayer);
    if(
TR_DidHit(trace))
    {
        
TR_GetEndPosition(starttrace);

        
GetVectorDistance(posstartfalse);
        
GetAngleVectors(angvecNULL_VECTORNULL_VECTOR);
        
start[0] -= 35 vec[0];
        
start[1] -= 35 vec[1];
        
start[2] -= 35 vec[2];

        
GetClientAbsOrigin(clientpos);

        
TeleportEntity(clientstartNULL_VECTORNULL_VECTOR);

        
GetClientMins(clientvec);
        
GetClientMaxs(clientang);
        
TR_TraceHullFilter(startstartvecangMASK_PLAYERSOLIDTraceEntityFilterPlayerclient);
        if(
TR_DidHit())
        {
            
CloseHandle(trace);
            
TeleportEntity(clientposNULL_VECTORNULL_VECTOR);
            return;
        }
    }
    
CloseHandle(trace); 

-
can't know how...can you upload a .sp file...
__________________
---- Signature Start ----
Web not i18n
My English poor
---- Signature End ----
PLTAT is offline
Grey83
Veteran Member
Join Date: Dec 2014
Location: Ukraine
Old 06-02-2024 , 02:45   Re: [ANY] Bring/GoTo [UPDATED 2/6/2017]
Reply With Quote #38

Quote:
Originally Posted by PLTAT View Post
can't know how...can you upload a .sp file...
you can find it there (for about 4 years now): https://hlmod.net/threads/42111/
__________________
Grey83 is offline
PLTAT
Member
Join Date: Apr 2023
Old 06-02-2024 , 05:20   Re: [ANY] Bring/GoTo [UPDATED 2/6/2017]
Reply With Quote #39

Quote:
Originally Posted by Grey83 View Post
you can find it there (for about 4 years now): https://hlmod.net/threads/42111/

-
you code have menu is good, but not work real teleport....for other player
only can teleport player self is good... i don't know why....
__________________
---- Signature Start ----
Web not i18n
My English poor
---- Signature End ----
PLTAT is offline
Grey83
Veteran Member
Join Date: Dec 2014
Location: Ukraine
Old 06-02-2024 , 05:41   Re: [ANY] Bring/GoTo [UPDATED 2/6/2017]
Reply With Quote #40

Quote:
Originally Posted by PLTAT View Post
-
you code have menu is good, but not work real teleport....for other player
only can teleport player self is good... i don't know why....
This code does not allow you to teleport a player if the destination location is already occupied by some entity
__________________
Grey83 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:13.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode