07.04.2009, 15:01
thats the code It doesnt work
Код:
if(strcmp(cmd, "/buyfuel", true) == 0)
{
if(PlayerInfo[playerid][pJob] != 16)
{
SendClientMessage(playerid, COLOR_GREY, "You are not a trucker.");
return 1;
}
else if(PlayerToPoint(25.0, playerid, 999.6520,-897.9469,42.2462))
{
new oil;
oil = strval(tmp);
if (PlayerInfo[playerid][pOil] >= 100)
{
SendClientMessage(playerid, COLOR_GREY, "Your truck is filled up.");
return 1;
}
else
{
if(GetPlayerMoney(playerid) < 499)
{
SendClientMessage(playerid, COLOR_GREY, "You dont have enought money ($500).");
return 1;
}
}
new tmpcar = GetPlayerVehicleID(playerid);
if(!IsATruck(tmpcar))
{
SendClientMessage(playerid, COLOR_GREY, "You are not in a Truck.");
return 1;
}
else
{
if(GetVehicleTrailer(GetPlayerVehicleID(playerid) == 584))
{
SafeGivePlayerMoney(playerid, - 500);
PlayerInfo[playerid][pOil] = 100;
format(string, sizeof(string), "You have filled your truck with fuel!", oil, oil * 150);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
SaveOilSystem();
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You are not carring a trailer.");
return 1;
}
}
}
return 1;
}

