[Ayuda] Antichead
#1

Hola, quisiera saber como poner el antichead de dinero que cuando te pones dinero te lo baja a la cantidad que tenias
Reply
#2

Creas una variable para cada jugador que tenga el dinero que DEBERНA tener. Cada cierto tiempo chequeas si tiene mбs o menos de la cantidad de la variable, si el dinero es diferente a la variable, busca la forma de equilibrar el dinero con la variable.

pawn Код:
new cash[MAX_PLAYERS];
pawn Код:
public OnPlayerUpdate(playerid)
{
  if(GetPlayerMoney(playerid) != cash[playerid]) GivePlayerMoney(playerid, -1 * (GetPlayerMoney(playerid) - cash));
  return 1;
}
pawn Код:
GivePlayerCash(playerid, amount)
{
  cash = cash + amount;
  GivePlayerMoney(playerid, cash);
  return 1;
}
Por cierto, es Anticheat, no Antichead.
Reply
#3

es solo eso? porque me da errores..

C:\DOCUME~1\Abraham\ESCRIT~1\Server\NUEVOG~1\GAMEM O~1\LSSFRP.pwn(7391) : warning 219: local variable "cash" shadows a variable at a preceding level
C:\DOCUME~1\Abraham\ESCRIT~1\Server\NUEVOG~1\GAMEM O~1\LSSFRP.pwn(7712) : warning 219: local variable "cash" shadows a variable at a preceding level
C:\DOCUME~1\Abraham\ESCRIT~1\Server\NUEVOG~1\GAMEM O~1\LSSFRP.pwn(15475) : warning 219: local variable "cash" shadows a variable at a preceding level
C:\DOCUME~1\Abraham\ESCRIT~1\Server\NUEVOG~1\GAMEM O~1\LSSFRP.pwn(33147) : warning 219: local variable "cash" shadows a variable at a preceding level
C:\DOCUME~1\Abraham\ESCRIT~1\Server\NUEVOG~1\GAMEM O~1\LSSFRP.pwn(59150) : error 025: function heading differs from prototype
C:\DOCUME~1\Abraham\ESCRIT~1\Server\NUEVOG~1\GAMEM O~1\LSSFRP.pwn(59151) : error 021: symbol already defined: "GivePlayerCash"
C:\DOCUME~1\Abraham\ESCRIT~1\Server\NUEVOG~1\GAMEM O~1\LSSFRP.pwn(59183) : error 021: symbol already defined: "OnPlayerUpdate"
C:\DOCUME~1\Abraham\ESCRIT~1\Server\NUEVOG~1\GAMEM O~1\LSSFRP.pwn(59184) : error 033: array must be indexed (variable "cash")
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.


me podrias dar todo y explicarlo como va?
Reply
#4

No, eso no es lo ъnico que tienes que hacer, por lo que veo copiastes y pegastes todo... Si quieres aprender estudia un script.

Aquн te va un ejemplo: http://forum.sa-mp.com/index.php?topic=171898.0

Reply
#5

No estoy entendiendo nada solamente podes decir donde va cada cosa y ya? xd
Reply
#6

Men, te respondi con el Link del Post del anticheat que quieres, pero, Zamaroth lo borro :S
Reply
#7

Quote:
Originally Posted by Jesus^
Men, te respondi con el Link del Post del anticheat que quieres, pero, Zamaroth lo borro :S
Yo no te borrй nada en este topic, asн que no vayas diciendo "Zamaroth esto, Zamaroth lo otro".
Reply
#8

Bueh.. Tonces fue un Admin Gringo...
Reply
#9

Quote:
Originally Posted by SAWC™
Creas una variable para cada jugador que tenga el dinero que DEBERНA tener. Cada cierto tiempo chequeas si tiene mбs o menos de la cantidad de la variable, si el dinero es diferente a la variable, busca la forma de equilibrar el dinero con la variable.

pawn Код:
new cash[MAX_PLAYERS];
pawn Код:
public OnPlayerUpdate(playerid)
{
  if(GetPlayerMoney(playerid) != cash[playerid]) GivePlayerMoney(playerid, -1 * (GetPlayerMoney(playerid) - cash));
  return 1;
}
pawn Код:
GivePlayerCash(playerid, amount)
{
  cash = cash + amount;
  GivePlayerMoney(playerid, cash);
  return 1;
}
Por cierto, es Anticheat, no Antichead.
Tonces es asi?
Reply
#10

Te recomiendo que dejes el dinero del juego aparte y crees tu propio sistema de dinero asн serб imposible usar los cheats
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)