Sweeper job help,bug
#1

When i drive at the sweeper everything ok,but that gives me money and take it back,that doesnt gives me the money.
"You have received $300 for your Street Sweeping Job!"
that gives me the money and takes it back.
Quote:

#include <a_samp>

new stimer;

#define WAIT_TIME 40000


public OnFilterScriptInit()
{
print("[FILTERSCRIPT]Street Sweeping Job has loaded successfully");
return 1;
}
public OnFilterScriptExit()
{
print("[FILTERSCRIPT]Street Sweeping Job has unloaded successfully");
return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 574)
{
stimer = SetTimerEx("Sweeping", WAIT_TIME, true, "d", playerid);
SendClientMessage(playerid, 0x58E11EC8, "You are now Street Sweeping to earn money. Drive around and earn money!");
}

}
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
if(GetVehicleModel(vehicleid) == 574)
{
KillTimer(stimer);
SendClientMessage(playerid, 0x58E11EC8, "You are no longer doing your Street Sweeping Job!");
}
return 1;
}


forward Sweeping(playerid);
public Sweeping(playerid)
{
new string[128];
new rand = 100 + random(210);
GivePlayerMoney(playerid, rand);
format(string, sizeof(string), "You have received $%d for your Street Sweeping Job!", rand);
SendClientMessage(playerid, 0x58E11EC8, string);
return 1;
}

how to fix it?
Reply


Messages In This Thread
Sweeper job help,bug - by BarFix - 27.09.2013, 13:05
Re: Sweeper job help,bug - by TonyII - 27.09.2013, 13:08
Re: Sweeper job help,bug - by BarFix - 27.09.2013, 13:11
Re: Sweeper job help,bug - by TonyII - 27.09.2013, 13:13
Re: Sweeper job help,bug - by BarFix - 27.09.2013, 13:17
Re: Sweeper job help,bug - by TonyII - 27.09.2013, 13:20
Re: Sweeper job help,bug - by BarFix - 27.09.2013, 13:28
Re: Sweeper job help,bug - by Unri - 27.09.2013, 13:56

Forum Jump:


Users browsing this thread: 1 Guest(s)