rEf 53 Odesláno: 12. Leden, 2015 Share Odesláno: 12. Leden, 2015 (upraveno) Ahoj snažím se udělat co nejkratší a funkční Anticheat proti zbraním no funguje až moc dobře a to je můj problém Kód: #define AC_GivePlayerWeapon(%0,%1,%2) SetPVarInt(%0,"ac_weapon",AC_GetPlayerWeapon(%0)+%1+AC_GetPlayerAmmo(%0)),GivePlayerWeapon(%0,%1,%2) #define AC_ResetPlayerWeapons(%0) SetPVarInt(%0,"ac_weapon",0),ResetPlayerWeapons(%0) #define AC_GetPlayerWeapon(%0) GetPVarInt(%0,"ac_weapon") #define AC_GetPlayerAmmo(%0) GetPVarInt(%0,"ac_weapon") if(AC_GetPlayerWeapon(i) != GetPlayerWeapon(i)) { new const ac_weapon = AC_GetPlayerWeapon(i), ac_weaponammo = AC_GetPlayerAmmo(i); AC_ResetPlayerWeapons(i), AC_GivePlayerWeapon(i, ac_weapon, ac_weaponammo); } Problém je v tom že i když dám zbraň přes AC_GivePlayerWeapon tak se to resetuje, zatím co u peněz to funguje normálně. Nejsem si jistý co tam je blbě. PRO QWERA: Ty sem ani nepiš, leda že by si našel způsob jiný než stock Edited 12. Leden, 2015 by rEf Link to comment Share on other sites More sharing options...
0 Mivčo 90 Odesláno: 12. Leden, 2015 Share Odesláno: 12. Leden, 2015 +AC_GetPlayerAmmo(%0) skusal si aj bez tochto...? Link to comment Share on other sites More sharing options...
0 rEf 53 Odesláno: 12. Leden, 2015 Author Share Odesláno: 12. Leden, 2015 To je možná ten problém že bych měl zkusit zjišťovat ammo jiným způsobem ale nevím to se mi nezdá Link to comment Share on other sites More sharing options...
0 Globální moderátor Hip 191 Odesláno: 12. Leden, 2015 Globální moderátor Share Odesláno: 12. Leden, 2015 AC_GetPlayerWeapon(%0)+%1+AC_GetPlayerAmmo(%0) to je podle mě naprostá hovadina, když si to rozeberu tak je to (zjistí ID zbraně hráče + přičte ID zbraně + přičte náboje hráčovy zbraně) musíš mít PVar jak na ID zbraně tak na náboje ale i tak by to bylo složité... spíš zkus 3D pole (musíš použít enum) a budeš tam ukládat ID, ID zbraně, náboje EDIT: Musíš mít PVar Pvaru protože ID zbraně a náboje jsou propojené ... Link to comment Share on other sites More sharing options...
0 eXot 18 Odesláno: 12. Leden, 2015 Share Odesláno: 12. Leden, 2015 (upraveno) AC_GetPlayerWeapon(%0)+%1+AC_GetPlayerAmmo(%0) to je podle mě naprostá hovadina, když si to rozeberu tak je to (zjistí ID zbraně hráče + přičte ID zbraně + přičte náboje hráčovy zbraně) musíš mít PVar jak na ID zbraně tak na náboje ale i tak by to bylo složité... spíš zkus 3D pole (musíš použít enum) a budeš tam ukládat ID, ID zbraně, náboje EDIT: Musíš mít PVar Pvaru protože ID zbraně a náboje jsou propojené ... A dalšia vec v oboch fce získava ten istý integer #define AC_GetPlayerWeapon(%0) GetPVarInt(%0,"ac_weapon") #define AC_GetPlayerAmmo(%0) GetPVarInt(%0,"ac_weapon") A potom používa new const ac_weapon = AC_GetPlayerWeapon(i), ac_weaponammo = AC_GetPlayerAmmo(i); AC_GivePlayerWeapon(i, ac_weapon, ac_weaponammo); čo mu dosadí absolútne nezmyselné čísla takže mu to žiadnu zbran nedá Edited 12. Leden, 2015 by eXistenz Link to comment Share on other sites More sharing options...
0 Globální moderátor Hip 191 Odesláno: 12. Leden, 2015 Globální moderátor Share Odesláno: 12. Leden, 2015 ono nesmyslné čísla tam zadá už při AC_GivePlayerWeapon Link to comment Share on other sites More sharing options...
0 rEf 53 Odesláno: 12. Leden, 2015 Author Share Odesláno: 12. Leden, 2015 Ano chlapci už o tom vím nějakou hodinu ale i tak díky. A dalšia vec v oboch fce získava ten istý integer #define AC_GetPlayerWeapon(%0) GetPVarInt(%0,"ac_weapon") #define AC_GetPlayerAmmo(%0) GetPVarInt(%0,"ac_weapon") A potom používa new const ac_weapon = AC_GetPlayerWeapon(i), ac_weaponammo = AC_GetPlayerAmmo(i); AC_GivePlayerWeapon(i, ac_weapon, ac_weaponammo); čo mu dosadí absolútne nezmyselné čísla takže mu to žiadnu zbran nedá Tak si to zkus, zbraně to dává. Link to comment Share on other sites More sharing options...
0 Globální moderátor Hip 191 Odesláno: 12. Leden, 2015 Globální moderátor Share Odesláno: 12. Leden, 2015 však ano, zbraň to dá, ale do PVaru to uloží naprostou hovadinu Link to comment Share on other sites More sharing options...
Dotaz
rEf 53
Ahoj snažím se udělat co nejkratší a funkční Anticheat proti zbraním no funguje až moc dobře a to je můj problém
Kód:
Problém je v tom že i když dám zbraň přes AC_GivePlayerWeapon tak se to resetuje, zatím co u peněz to funguje normálně.
Nejsem si jistý co tam je blbě.
PRO QWERA: Ty sem ani nepiš, leda že by si našel způsob jiný než stock
Edited by rEfLink to comment
Share on other sites
7 odpovědí na tuto otázku
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now