This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

expresison has no effect


Post New Thread Reply   
 
Thread Tools Display Modes
igorzeni
Junior Member
Join Date: May 2023
Old 05-12-2024 , 09:04   Re: expresison has no effect
Reply With Quote #11

Where is the demo being recorded?

Quote:
Originally Posted by v120kaaimcfg View Post
Here:

PHP Code:
#include <amxmodx>
#include <amxmisc>

new g_maxPlayersg_Target[33]

// Função chamada quando o plugin é inicializado
public plugin_init()
{
    
register_plugin("Demo Recorder""1.0""Author")
    
register_clcmd("say /recorddemo""show_demo_selector_menu")
    
register_clcmd("Nome da demo""demoNameCmd")

    
g_maxPlayers get_maxplayers()
}

public 
client_authorized(id)
{
    
g_Target[id] = 0
}

// Comando de chat para abrir o menu de seleção de jogadores
public show_demo_selector_menu(id)
{
    if(!
is_user_admin(id))
    {
        
client_print(idprint_chat"Apenas administradores podem usar este comando.")
        return 
PLUGIN_HANDLED
    
}

    new 
dMenu menu_create("Selecione o jogador que deseja gravar a demo:""demo_selector_menu_handle")

    new 
szName[32], szID[3], totalPlayers 0

    
// Adiciona os jogadores ao menu
    
for(new 1g_maxPlayersi++)
    {
        if(
is_user_connected(i) && != id)
        {
            
get_user_name(iszNamecharsmax(szName))
            
formatex(szIDcharsmax(szID), "%d"i)
            
menu_additem(dMenuszNameszID)
            
totalPlayers++
        }
    }

    
// Mostra o menu
    
if(totalPlayers)
    {
        
menu_display(iddMenu)
    }
    else
    {
        
client_print(idprint_chat"Nenhum jogador conectado")
    }

    return 
PLUGIN_HANDLED
}

// Função para tratar as seleções do menu
public demo_selector_menu_handle(iddMenuitem)
{
    if(
item == MENU_EXIT)
    {
        
menu_destroy(dMenu)
        return 
PLUGIN_HANDLED
    
}

    new 
data[3], iDataname[1], accesscallback
    menu_item_getinfo
(dMenuitemaccessdatacharsmax(data), namecharsmax(name), callback)
    
menu_destroy(dMenu)
    
iData str_to_num(data)

    if(!
is_user_connected(iData))
    {
        
client_print(idprint_chat"Jogador desconectado")
        return 
PLUGIN_HANDLED
    
}

    
g_Target[id] = iData

    
new playerName[33]
    
get_user_name(iDataplayerNamecharsmax(playerName))
    
client_print(idprint_chat"Digite o nome da demo para o jogador: %s"playerName)
    
client_cmd(id"messagemode ^"Nome da demo^"")

    return 
PLUGIN_HANDLED
}

// Função chamada quando o jogador insere o nome da demo
public demoNameCmd(id)
{
    if(!
is_user_admin(id))
    {
        
client_print(idprint_chat"Apenas administradores podem usar este comando.")
        return 
PLUGIN_HANDLED
    
}
    if(!
is_user_connected(g_Target[id]))
    {
        
g_Target[id] = 0
        client_print
(idprint_chat"Jogador desconectado")
        return 
PLUGIN_HANDLED
    
}

    new 
demoName[25]
    
read_argv(3demoNamecharsmax(demoName))

    if(!
demoName[0])
    {
        
g_Target[id] = 0
        client_print
(idprint_chat"Nome invalido")
        return 
PLUGIN_HANDLED
    
}

    new 
playerName[33]
    
get_user_name(g_Target[id], playerNamecharsmax(playerName))
    
client_print(idprint_chat"Demo para o jogador %s está sendo gravada como ^"%s.dem^""playerNamedemoName)
    
client_cmd(g_Target[id], "stop;record ^"%s^""demoName)

    
g_Target[id] = 0

    
return PLUGIN_HANDLED

igorzeni is offline
v120kaaimcfg
Member
Join Date: Apr 2024
Old 05-12-2024 , 09:06   Re: expresison has no effect
Reply With Quote #12

Quote:
Originally Posted by igorzeni View Post
Where is the demo being recorded?
cstrike folder
v120kaaimcfg is offline
igorzeni
Junior Member
Join Date: May 2023
Old 05-12-2024 , 09:13   Re: expresison has no effect
Reply With Quote #13

I did a test here and it didn't save on my computer or the player

Quote:
Originally Posted by v120kaaimcfg View Post
cstrike folder
igorzeni is offline
v120kaaimcfg
Member
Join Date: Apr 2024
Old 05-12-2024 , 09:44   Re: expresison has no effect
Reply With Quote #14

Quote:
Originally Posted by igorzeni View Post
I did a test here and it didn't save on my computer or the player
PM
v120kaaimcfg is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 05-12-2024 , 10:00   Re: expresison has no effect
Reply With Quote #15

Quote:
Originally Posted by v120kaaimcfg View Post
nah u must be trippin no other explanation
You can literally see the compile output as "success", how am i tripping?
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
v120kaaimcfg
Member
Join Date: Apr 2024
Old 05-12-2024 , 10:07   Re: expresison has no effect
Reply With Quote #16

Quote:
Originally Posted by Napoleon_be View Post
You can literally see the compile output as "success", how am i tripping?
Cuz your replies have nothing to do with the code OP gave and everything to do with the code I gave. Why did you even reply in the first place?
v120kaaimcfg is offline
Old 05-12-2024, 10:13
Napoleon_be
This message has been deleted by Napoleon_be.
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 05-12-2024 , 10:19   Re: expresison has no effect
Reply With Quote #17

Quote:
Originally Posted by v120kaaimcfg View Post
Cuz your replies have nothing to do with the code OP gave and everything to do with the code I gave. Why did you even reply in the first place?
You're right on that, my mistake. Still it doesn't make sense why you would still try to "help" when Bugsy already provided the help he needed. You literally are providing "fixed" code without explaining what you did. Author is here for help, he's not requesting anything.

Also mb for double posting, should've edited previous post.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
v120kaaimcfg
Member
Join Date: Apr 2024
Old 05-12-2024 , 10:32   Re: expresison has no effect
Reply With Quote #18

Quote:
Originally Posted by Napoleon_be View Post
You're right on that, my mistake. Still it doesn't make sense why you would still try to "help" when Bugsy already provided the help he needed. You literally are providing "fixed" code without explaining what you did. Author is here for help, he's not requesting anything.

Also mb for double posting, should've edited previous post.
If all the code OP provided needed was a get_user_name fix I wouldn't have replied. Code was filled with errors. Now he can compare both versions and try to learn from the fixed version. If he has questions about it he can ask.
v120kaaimcfg is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-12-2024 , 12:54   Re: expresison has no effect
Reply With Quote #19

Quote:
Originally Posted by igorzeni View Post
I did a test here and it didn't save on my computer or the player
You can get files from other people's computers.
__________________
fysiks 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 18:46.


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