please help me
#1

I downloaded a Sweeper job script
when i am doing the job thats give me the money then remove it
how to fix it

PHP код:
#include <a_samp>
#define COLOR_DARKGOLD 0x808000AA
#define COLOR_RED 0xFF0000AA
#define COLOR_YELLOW 0xFFFF00AA
new SweepingJob[256];
public 
OnFilterScriptInit()
{
    
AddStaticVehicle(574,2192.4170,-1985.5463,13.55070,0,0); // Sweeper1
    
AddStaticVehicle(574,2192.9231,-1989.3281,13.5469,0,0); // Sweeper2
    
AddStaticVehicle(574,2192.5750,-1992.0787,13.5469,0,0); // Sweeper3
}
forward SweeperJobFinish(playerid);
public 
SweeperJobFinish(playerid)
{
    if(
SweepingJob[playerid] == 0){ return 1; }
    
GivePlayerMoney(playerid,200);
    
SendClientMessage(playerid,COLOR_YELLOW,"* You have been payed for your job! - $200");
    
SweepingJob[playerid] = 0;
    return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/sweeper"cmdtexttrue10) == 0)
    {
        if(
GetVehicleModel(GetPlayerVehicleID(playerid)) == 574)
        {
            
SweepingJob[playerid] = 1;
            new 
name[MAX_PLAYER_NAME], string[48];
            
GetPlayerName(playeridnamesizeof(name));
            
format(stringsizeof(string), "* %s is now a StreetSweeper."name );
            
SendClientMessageToAll(COLOR_YELLOWstring);
            
SendClientMessage(playerid,COLOR_YELLOW,"* Clean the street for 1 minute and recieve $200");
            
SetTimerEx("SweeperJobFinish"60000false"i"playerid);
            return 
1;
        }
        
SendClientMessage(playeridCOLOR_RED,"You have to be in a streetsweeper to start the job");
    }
    return 
0;
}
public 
OnPlayerEnterVehicle(playeridvehicleidispassenger)
{
     if(
GetVehicleModel(GetPlayerVehicleID(playerid)) == 574)
     {
         
SendClientMessage(playeridCOLOR_RED"* You can start the sweepingjob by using /sweeper");
     }
     return 
0;
}
public 
OnPlayerExitVehicle(playeridvehicleid)
{
    if(
SweepingJob[playerid] == 1)
    {
        
SendClientMessage(playeridCOLOR_RED"* You have left your job, you won't be payed.");
        
SweepingJob[playerid] = 0;
    }

Reply
#2

Is the main script using a Anti-Money cheat?
If so, that will cause GivePlayerMoney() to reset once used, as it's reading it as a 'hack'.
Reply
#3

Quote:
Originally Posted by Lynn
Посмотреть сообщение
Is the main script using a Anti-Money cheat?
If so, that will cause GivePlayerMoney() to reset once used, as it's reading it as a 'hack'.
So how i fix it?
i will send you my script if you want
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)