[Ayuda] Antichead -
Daniel_Barrera - 21.05.2010
Hola, quisiera saber como poner el antichead de dinero que cuando te pones dinero te lo baja a la cantidad que tenias
Re: [Ayuda] Antichead -
Miguel - 21.05.2010
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 Код:
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.
Re: [Ayuda] Antichead -
Daniel_Barrera - 21.05.2010
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?
Re: [Ayuda] Antichead -
Miguel - 22.05.2010
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
Re: [Ayuda] Antichead -
Daniel_Barrera - 22.05.2010
No estoy entendiendo nada

solamente podes decir donde va cada cosa y ya? xd
Re: [Ayuda] Antichead -
Jesus^ - 22.05.2010
Men, te respondi con el Link del Post del anticheat que quieres, pero, Zamaroth lo borro :S
Re: [Ayuda] Antichead -
Zamaroht - 22.05.2010
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".
Re: [Ayuda] Antichead -
Jesus^ - 22.05.2010
Bueh.. Tonces fue un Admin Gringo...
Re: [Ayuda] Antichead -
TiNcH010 - 22.05.2010
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 Код:
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?
Re: [Ayuda] Antichead -
CTCCoco - 22.05.2010
Te recomiendo que dejes el dinero del juego aparte y crees tu propio sistema de dinero asн serб imposible usar los cheats