24.08.2015, 14:27
(
Последний раз редактировалось toxicape; 24.08.2015 в 18:24.
)
This is where he need to pay.
Код:
if(IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i) == 2 && TransportDuty[i] > 0) { if(GetPlayerCash(playerid) < TransportValue[i]) { new string[28]; format(string, sizeof(string), "* You need $%d to enter.", TransportValue[i]); SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string); //RemovePlayerFromVehicle(playerid); new Float:X, Float:Y, Float:Z; GetPlayerPos(playerid, X, Y, Z); SetPlayerPos(playerid, X, Y, Z+2); TogglePlayerControllable(playerid, 1); } else { new string[64]; if(TransportDuty[i] == 1) { format(string, sizeof(string), "* You paid $%d to the Taxi Driver.", TransportValue[i]); SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* Passenger %s has entered your Taxi.", GetPlayerNameEx(playerid)); SendClientMessageEx(i, COLOR_LIGHTBLUE, string); TransportTime[i] = 1; TransportTime[playerid] = 1; TransportCost[playerid] = TransportValue[i]; TransportCost[i] = TransportValue[i]; TransportDriver[playerid] = i; } else if(TransportDuty[i] == 2) { format(string, sizeof(string), "* You paid $%d to the Taxi Driver.", TransportValue[i]); SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* Passenger %s has entered your Taxi.", GetPlayerNameEx(playerid)); SendClientMessageEx(i, COLOR_LIGHTBLUE, string); } GivePlayerCash(playerid, -TransportValue[i]); TransportMoney[i] += TransportValue[i]; }