SA-MP Forums Archive
Dealership Question- problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Dealership Question- problem (/showthread.php?tid=352330)



Dealership Question- problem - Dan_Barocu - 19.06.2012

When i buy a car in dealership the money doesent go down because i have an anti money cheat what can i do or show you?


Re: Dealership Question- problem - doreto - 19.06.2012

try to useing your anti-cheat money varible (if have one)


Re: Dealership Question- problem - Dan_Barocu - 19.06.2012

DELEte


Re: Dealership Question- problem - reh_007 - 19.06.2012

Delete, your anti money cheat, ofc.


Re: Dealership Question- problem - Dan_Barocu - 19.06.2012

so i have 300.000$ at me when i go buy a car the 300.000$ remains in my pocket..


Re: Dealership Question- problem - Dan_Barocu - 19.06.2012

can anyone help me??


Re: Dealership Question- problem - Edin Black - 19.06.2012

delete the anticheat lol


Re: Dealership Question- problem - Dan_Barocu - 19.06.2012

can somehelp me please?


Re: Dealership Question- problem - MarinacMrcina - 19.06.2012

Sure!
Can you show us the command which you use to buy a car and the AntiCheat part that protects your money?


Re: Dealership Question- problem - Dan_Barocu - 19.06.2012

PHP код:
else if(strcmp(x_nr,"buy",true) == 0)
            {
                if(
IsAnOwnableCar(idcar))
                {
                    if(
PlayerInfo[playerid][pPcarkey] == -1) { }
                    else if(
PlayerInfo[playerid][pPcarkey2] == -1) { }
                    else if(
PlayerInfo[playerid][pPcarkey3] == -1) { }
                    else { 
SendClientMessage(playeridCOLOR_GREY"   Ai deja 3 masini!!"); return 1; }
                    if(
CarInfo[idcar][cOwned]==1)
                    {
                        
SendClientMessage(playeridCOLOR_GREY"Someone already owns this car");
                        return 
1;
                    }
                     if(
GetPlayerMoney(playerid) >= CarInfo[idcar][cValue])
                    {
                        if(
PlayerInfo[playerid][pPcarkey] == -1) { PlayerInfo[playerid][pPcarkey] = idcar; }
                        else if(
PlayerInfo[playerid][pPcarkey2] == -1) { PlayerInfo[playerid][pPcarkey2] = idcar; }
                        else if(
PlayerInfo[playerid][pPcarkey3] == -1) { PlayerInfo[playerid][pPcarkey3] = idcar; }
                        else { return 
1; }
                        
CarInfo[idcar][cOwned] = 1;
                        
GetPlayerName(playeridsendernamesizeof(sendername));
                        
strmid(CarInfo[idcar][cOwner], sendername0strlen(sendername), 999);
                          
GivePlayerMoney(playerid,-CarInfo[idcar][cValue]);
                        
PlayerPlaySound(playerid10520.00.00.0);
                        
GameTextForPlayer(playerid"~w~Felicitari~n~Nu uita sa o parchezi cu /v park!"50003);
                        
SendClientMessage(playeridCOLOR_GRAD2"Felicitari ti-ai cumparat o masina noua!");
                        
TogglePlayerControllable(playerid1);
                        
OnPropUpdate(); SavePlayerData(playerid);
                        return 
1;
                    }
                    else
                    {
                        
SendClientMessage(playeridCOLOR_GREY"  You don't have enough cash with you ! ");
                        return 
1;
                    }
                }
            } 
anticheat


PHP код:
//    
format(stringsizeof(string), "[WARNING]: %s (ID:%d) tried to spawn $%d - This could be a money cheat."GetPlayerNameEx(i), ihack);
                                
HackLog(string);
                              }
                              if(
hack >= 99999999)
                              {
                                new 
string[128];
                                  
format(string256"AdmWarning: %s (ID:%d) tried to spawn $%d - This could be a money cheat."GetPlayerNameEx(i), ihack);
                                
AHackTog(COLOR_YELLOW,string,1);
                                
format(stringsizeof(string), "[WARNING]: %s (ID:%d) tried to spawn $%d - This could be a money cheat."GetPlayerNameEx(i), ihack);
                                
HackLog(string);
                              }
                             
ResetMoneyBar(i);//Resets the money in the original moneybar, Do not remove!
                            
UpdateMoneyBar(iPlayerInfo[i][pCash]);//Sets the money in the moneybar to the serverside cash, Do not remove!
                        
}
                    }
                    }
                    }
                    return 
1;
                    }