28.03.2014, 12:39
Well..I found a bug..When someones goes to refuel his vehicle and types /refuel then it appears a message saying.."Your vehicle's tank has been refilled for $100.". The problem is that the script doesn't send this message ONCE (+ takes 100$ once) but it doesn't stop say: "Your vehicle's tank has been refilled for $100." <= It spams you and it takes all your money..How can I fix it?
Код:
stock StopRefueling(playerid)
{
GivePlayerCash(playerid, -100);
SendFormattedMessage(playerid, COLOR_WHITE,"Your vehicle's tank has been refilled for $100.");
new mypoint = -1;
for (new i=0; i<MAX_POINTS; i++)
{
if(strcmp(Points[i][Name], "Fossil Fuel Company", true) == 0)
{
mypoint = i;
}
}
for(new i = 0; i < sizeof(FamilyInfo); i++)
{
if(strcmp(Points[mypoint][Owner], FamilyInfo[i][FamilyName], true) == 0)
{
FamilyInfo[i][FamilyBank] = FamilyInfo[i][FamilyBank]+(RefuelingVehiclePrice[playerid]/10);
}
}
RefuelingVehicle[playerid] = 0; RefuelingVehiclePrice[playerid] = 0; KillTimer(RefuelingVehicleTimer[playerid]); // should i remove this???!!!
return true;
}

