11.04.2011, 11:10
PM ME IF YOU WANT FULL CODE
Код:
#include <a_samp> #define SLOTS (500) #define MAX_MONEY 99999999 #define MAX_AVISOS_HACK 5 new AvisosHack[SLOTS]; new Cash[SLOTS]; stock MoneyHack() { print("\n-----------------------------------------------------------------"); print("* ANTI_MH by Bilawal *"); printf("Cel Mai Tare %d |",MAX_MONEY,MAX_AVISOS_HACK); print("--------------------------------------------------------------\n"); new HackFile[26]; format(HackFile, sizeof HackFile,"MoneyHack.log"); if(!fexist(HackFile)) CriarArquivo(HackFile); SetTimer("CheckMoney",1000,true); return 1; } forward CheckMoney(); public CheckMoney() { for(new a = 0 ; a <= SLOTS ; ++ a) { if(GetPlayerMoney(a) < GetPlayerCash(a)) { ResetPlayerCash(a); GivePlayerCash(a,GetPlayerMoney(a)); return 0; } if(GetPlayerMoney(a) > GetPlayerCash(a)) { ResetPlayerMoney(a); GivePlayerMoney(a,GetPlayerCash(a)); new name[MAX_PLAYER_NAME]; new string[100]; GetPlayerName(a, name, sizeof(name)); format(string, sizeof(string), "%s Anti Money Hack",name); SendMessageToAdmins(0xFFFF00AA,string); SalvarAquivo(string); AvisosHack[a]++; if(AvisosHack[a] > MAX_AVISOS_HACK) { SendClientMessage(a,0xFFFF00AA,"Exces de Money Hack"); BanEx(a,"Money-Hack by X"); AvisosHack[a]=0; } return 0; } } return 1; } stock comandos(const string[], &index) { new length = strlen(string); while ((index < length) && (string[index] <= ' ')) { index++; } new offset = index; new result[20]; while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1))) { result[index - offset] = string[index]; index++; } result[index - offset] = EOS; return result; } stock SendMessageToAdmins(color,const msg[]) { for(new a = 0 ; a <= SLOTS ; ++ a) { if(IsPlayerConnected(a) && IsPlayerAdmin(a)) { SendClientMessage(a,color,msg); } } return 1; } stock GivePlayerCash(playerid,valor) { Cash[playerid]+=valor; return 1; } stock GetPlayerCash(playerid) { new cashtotal; cashtotal = Cash[playerid]; return cashtotal; } stock ResetPlayerCash(playerid) { Cash[playerid] = 0; return 1; } stock SalvarAquivo(const ahahah[]) { new string[128]; new File:HF = fopen("MoneyHack.log",io_append); format(string, sizeof (string), "%s \r\n", ahahah); fwrite(HF, string); fclose(HF); } stock CriarArquivo(filename[]) { new File:files; if (fexist(filename)) return false; files=fopen(filename,io_write); fclose(files); return true; }