27.06.2014, 09:48
can someone upgrade this Command
To : if you /fare 50 and a passenger has entered , the passenger will lose 50 Dollars and every 30 seconds the meter will go up to 60, which means additional 10 Dollars if the Passenger still not on their Location.
HELP PLEASE!
---------------------------------------------------------------------------------------------------------------
To : if you /fare 50 and a passenger has entered , the passenger will lose 50 Dollars and every 30 seconds the meter will go up to 60, which means additional 10 Dollars if the Passenger still not on their Location.
HELP PLEASE!
pawn Код:
CMD:fare(playerid, params[])
{
if(PlayerInfo[playerid][pJob] == 17 || PlayerInfo[playerid][pJob2] == 17)
{
new string[128], fare;
if(sscanf(params, "d", fare)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /fare [price]");
if(TransportDuty[playerid] > 0)
{
if(TransportDuty[playerid] == 1)
{
TaxiDrivers -= 1;
}
else if(TransportDuty[playerid] == 2)
{
BusDrivers -= 1;
}
TransportDuty[playerid] = 0;
format(string, sizeof(string), "* you're now off duty and earned $%d.", TransportMoney[playerid]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
GivePlayerCash(playerid, TransportMoney[playerid]);
ConsumingMoney[playerid] = 1; TransportValue[playerid] = 0; TransportMoney[playerid] = 0;
SetPlayerToTeamColor(playerid);
return 1;
}
if(JobDuty[playerid] != 0) return SendClientMessage(playerid,COLOR_GREY,"You need to get off duty with your mechanic/lawyer job first.");
new newcar = GetPlayerVehicleID(playerid);
if(IsAnTaxi(newcar))
{
if(GetPlayerState(playerid) == 2)
{
if(fare < 10 || fare > 250)
{
SendClientMessage(playerid, COLOR_GREY, " Fare price must be between $10 and $250!");
return 1;
}
TaxiDrivers += 1; TransportDuty[playerid] = 1; TransportValue[playerid] = fare;
format(string, sizeof(string), "* you're now on-duty as Taxi Driver, fare: $%d.", TransportValue[playerid]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
SetPlayerToTeamColor(playerid);
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You're not the driver!");
return 1;
}
}
else if(IsAnBus(newcar))
{
if(GetPlayerState(playerid) == 2)
{
if(fare < 10 || fare > 250)
{
SendClientMessage(playerid, COLOR_GREY, " Fare price must be between $10 and $250!");
return 1;
}
BusDrivers += 1; TransportDuty[playerid] = 2; TransportValue[playerid]=fare;
format(string, sizeof(string), "* you're now on-duty as Bus Driver, fare: $%d.", TransportValue[playerid]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
SetPlayerToTeamColor(playerid);
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You're not the driver!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You're not in a taxi or a bus!");
}
}
else
{
SendClientMessage(playerid,COLOR_GREY,"You're not a licensed taxi/bus driver!");
return 1;
}
return 1;
}
---------------------------------------------------------------------------------------------------------------
Social Gaming Roleplay
37.59.28.180:13030
English - Refunding - Hiring
New Roleplay Realistic Server
Strict Roleplay
English - Refunding - Hiring
New Roleplay Realistic Server
Strict Roleplay