Jump to content
  • 0

pomoc Ref potrebuje pomoct :'( To snad ne!


rEf

Dotaz

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 :d

 

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 :d

Edited by rEf
Link to comment
Share on other sites

7 odpovědí na tuto otázku

Recommended Posts

  • 0

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á :d

Link to comment
Share on other sites

  • 0
  • Globální moderátor

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 :d protože ID zbraně a náboje jsou propojené ...

Link to comment
Share on other sites

  • 0

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 :d 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 by eXistenz
Link to comment
Share on other sites

  • 0

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...