Перейти к содержимому
View in the app

A better way to browse. Learn more.

Zloplay community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Опубликовано:

How to convert dvar_t* to string? I wanted to change something by reading dvars in source of IW4M

Problem is reading dvars and return value like ' return getDvar("version"); '

tried dvar_t and dvar_value_t. i get some weird errors... so i need dvar reading and returning data as char*

'return' : cannot convert from 'const char *' to 'char *'

 

ps. i am completely noob at all and dont know anything about c

Featured Replies

Опубликовано:
How to convert dvar_t* to string? I wanted to change something by reading dvars in source of IW4M

Problem is reading dvars and return value like ' return getDvar("version"); '

tried dvar_t and dvar_value_t. i get some weird errors... so i need dvar reading and returning data as char*

'return' : cannot convert from 'const char *' to 'char *'

 

ps. i am completely noob at all and dont know anything about c

 

Do want to change a dvar, or just access it?

 

Did you mean something like this JpfW

Опубликовано:
  • Автор

for example of using this function

generate new optimized config for clients (by reading sys_* dvars)

make a plugin and read dvars send to server, know ppl cheating

whateveryouwant etc etc

 

just need help about this Visual C saying its not a value its a dvar_t* how can i get dvar's value in M source?

Опубликовано:
  • Автор
dvar->current.string;

Of course dvar should be a valid pointer to a dvar

Oh thanks a lot works!

 

i was copied that and changed dvar names that didnt work. I have no idea what i am doing :)

dvar_t* sv_hostname = Dvar_FindVar("sv_hostname");

char cleaned[1024] = { 0 };
StripColors(sv_hostname->current.string, cleaned, sizeof(cleaned));
SetConsoleTitle(cleaned);

 

Used this and worked

dvar_t* DvarName = Dvar_FindVar("DvarName");

	return DvarName->current.string;

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Гость
Ответить в тему...

Сейчас на странице 0

  • Нет пользователей, просматривающих эту страницу

Важная информация

Используя этот сайт, вы соглашаетесь Условия использования.

Account

Navigation

Поиск

Поиск

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.