Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

RSSRetreive a certain cvar by id


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
i posted this problem in scripting help and someone pointed out to me that the code wasn't compatible with multiplayer which is why i get this error when it try it in test server but not with bots while playing offline


Code:

L 02/23/2022 - 22:12:50: Invalid CVAR pointer
L 02/23/2022 - 22:12:50: [AMXX] Displaying debug trace (plugin "zp_knife_menu3v4.amxx")
L 02/23/2022 - 22:12:50: [AMXX] Run time error 10: native error (native "get_pcvar_num")
L 02/23/2022 - 22:12:50: [AMXX]    [0] zp_knife_menu3v4.sma::client_PostThink (line 2229)


PHP Code:

g_cvar_lefthand get_cvar_pointer("cl_righthand")
isRight get_pcvar_num(g_cvar_lefthand) ( this is from the client post-think one)
2 other errors same as one above just in diffrent functions 

the problem is the cvar cl_righthand is retrieved from server confing not according to player id .

my request is a way that would allow to retrieve that cvar by each player id if possible . if that can't be done that at least a way to Force value 1 to that cvar on all players so i can simply remove it from knife menu plugin .

i will attach the .sma down below in case someone needs the full code but please note that i shoved knives from external plugins in there kind of randomly so it is quite a mess there and probably has a lot of cringe code ( and repetitive stuff ) so bear with it for now since i plan to polish it in the future.

i have included the custom .inc for this sma down below so you can compile it but if you want to test the gameplay you're gonna need orpheu and boneposfix modules (i'll try to regroup everything about this plugin in one file in the future sorry for the mess )

Attached Files
File Type: sma Get Plugin or Get Source (zp_knife_menu3v4.sma - 190.5 KB)
File Type: inc zmpremium.inc (2.2 KB)
File Type: inc zmboss.inc (2.2 KB)
File Type: inc zmvip.inc (2.2 KB)
File Type: inc boneposfix.inc (118 Bytes)
File Type: inc orpheu.inc (9.2 KB)
File Type: inc zombie_plague_advance.inc (17.7 KB)

Przeczytaj cały wpis

Odnośnik do komentarza
Udostępnij na innych stronach

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...