Trucker job 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Trucker job problem (
/showthread.php?tid=72307)
Trucker job problem -
Amoken - 07.04.2009
How do I make this work? I mean the part of the script on wich u can only pick up fuel when u carring a trailer, also the vehid that I have to put next to getvehicle have to be the veh modle or the id of the veh in server?
Код:
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);
new tmpcar = GetPlayerVehicleID(playerid)
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;
}
else
{
if (IsATruck(tmpcar))
{
if(GetVehicleTrailer(GetPlayerVehicleID(playerid) == 121))
{
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
{
format(string, sizeof(string), "You are not in a trailer.", oil, oil * 150);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
return 1;
}
}
else
{
format(string, sizeof(string), "You are not in a truck.", oil, oil * 150);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
}
}
}
return 1;
}
Re: Trucker job problem -
Amoken - 07.04.2009
any ideas plzzzzzzzzzzzzzzzzzzzz post
Re: Trucker job problem -
Amoken - 07.04.2009
comon guys I need 1 answer plz
Re: Trucker job problem -
Amoken - 07.04.2009
The answer to my bro Solved coz I was using wrong command