Raised This Month: $51 Target: $400
 12% 

ConVars


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Grafitosky
Member
Join Date: Jul 2020
Old 11-27-2020 , 16:02   ConVars
Reply With Quote #1

I want the convars in cfg/sourcemod to change individual messages "PrintToChat(client, "this message can you change in cfg/sourcemod");" and with the command "PrintToChat(client, "You can turn on/off this message by typing !message");"




|--------------------------|
|Explanation in the code|
|--------------------------|








Code:
#include <sourcemod>
#include <cstrike>
#include <sdktools>
#include <sdkhooks>
#include <colorvariables>





public void OnPluginStart()
{
  RegConsoleCmd("sm_giveweapon", give);
}

 public Action give(int client, int args) 
 {
     GivePlayerItem(client, "weapon_ak47");
     PrintToChat(client, "You can turn on/off this message by typing !message");
     PrintToChat(client, "this message can you change in cfg/sourcemod");
 }

Last edited by Grafitosky; 11-28-2020 at 13:34.
Grafitosky is offline
GsiX
gee, six eggs
Join Date: Aug 2012
Location: Land Below The Wind
Old 11-28-2020 , 10:29   Re: ConVars
Reply With Quote #2

What message you try to convert?
If it not from NASA probably someone can decipher it.
And what that ak47 doing there?
__________________
If i happen to insulted you unintentionally,
it was me and Google Translate who did it.
GsiX is offline
Grafitosky
Member
Join Date: Jul 2020
Old 11-28-2020 , 11:32   Re: ConVars
Reply With Quote #3

Quote:
Originally Posted by GsiX View Post
What message you try to convert?
If it not from NASA probably someone can decipher it.
And what that ak47 doing there?
Each message in a separate plugin.
For example, in one plugin you can switch on/off messages when receiving ak47, and in the other one you can change messages in cfg/sourcemod
How to do such a function, thanks to which I can use (!message) command to turn off/off the message when giving AK-47, and using autoexec in cfg/sourcemod change the name of the message that is displayed.
Grafitosky is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 11-28-2020 , 13:08   Re: ConVars
Reply With Quote #4

I noticed that is Polish text the main post.

Messages are better to be in a translation file, cause cfg files doesn't work well on unicode characters (like
Chinese symbols), still didn't understand what you need, try explaining different.
__________________
Marttt is offline
Grafitosky
Member
Join Date: Jul 2020
Old 11-28-2020 , 13:32   Re: ConVars
Reply With Quote #5

Quote:
Originally Posted by Marttt View Post
I noticed that is Polish text the main post.

Messages are better to be in a translation file, cause cfg files doesn't work well on unicode characters (like
Chinese symbols), still didn't understand what you need, try explaining different.
Sorry, I copied the wrong text, I already edited it - now you should understand me
Grafitosky is offline
GsiX
gee, six eggs
Join Date: Aug 2012
Location: Land Below The Wind
Old 12-01-2020 , 04:16   Re: ConVars
Reply With Quote #6

is it this?

https://forums.alliedmods.net/showpo...2&postcount=17
__________________
If i happen to insulted you unintentionally,
it was me and Google Translate who did it.
GsiX is offline
Grafitosky
Member
Join Date: Jul 2020
Old 12-01-2020 , 06:26   Re: ConVars
Reply With Quote #7

Quote:
Originally Posted by GsiX View Post
nope i want this option "this message can you change in cfg/sourcemod"




when i get weapon I should also get a message, and this message I would like to edit in "cfg/sourcemod" with using autoexec with this code, I wanted to make it more clear what I mean,
Grafitosky is offline
GsiX
gee, six eggs
Join Date: Aug 2012
Location: Land Below The Wind
Old 12-01-2020 , 10:27   Re: ConVars
Reply With Quote #8

I have no clue what i m doing really.
I did exactly as asked.. so here it is.. what this plugin does? i have no idea.

command "wiadomosc_giveweapon ak47"

Spoiler
__________________
If i happen to insulted you unintentionally,
it was me and Google Translate who did it.

Last edited by GsiX; 12-01-2020 at 10:37.
GsiX is offline
Grafitosky
Member
Join Date: Jul 2020
Old 12-01-2020 , 10:47   Re: ConVars
Reply With Quote #9

Quote:
Originally Posted by GsiX View Post
I have no clue what i m doing really.
I did exactly as asked.. so here it is.. what this plugin does? i have no idea.

command "wiadomosc_giveweapon ak47"

Spoiler


That's what I meant, thank you very much. And I would like to apologize to you for my writing in English
Grafitosky 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 13:35.


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