31.08.2009, 16:29
Quote:
} if(strcmp(cmd,"/fare",true)==0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10) { if(TransportDuty[playerid] > 0) { if(TransportDuty[playerid] == 1) { TaxiDrivers -= 1; } TransportDuty[playerid] = 0; format(string, sizeof(string), "* You are now Off Duty and earned $%d.", TransportMoney[playerid]+500); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); GivePlayerMoney(playerid, TransportMoney[playerid]+500); ConsumingMoney[playerid] = 1; TransportValue[playerid] = 0; TransportMoney[playerid] = 0; return 1; } if(IsPlayerInAnyVehicle(playerid)) { if(GetPlayerState(playerid) == 2) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USE: /fare [price]"); return 1; } moneys = strval(tmp); if(moneys < 0 || moneys > 9999) { SendClientMessage(playerid, COLOR_GREY, " Fare price must be between $0 and $9999 !"); return 1; } TaxiDrivers += 1; TransportDuty[playerid] = 1; TransportValue[playerid] = moneys; GetPlayerName(playerid,sendername,sizeof(sendernam e)); format(string, sizeof(string), "Taxi driver %s is on duty, use /service taxi to call a Taxi fare: $%d.", sendername, TransportValue[playerid]); OOCNews(COLOR_YELLOW,string); } else { SendClientMessage(playerid, COLOR_GREY, " You are not the Driver !"); return 1; } } } else { SendClientMessage(playerid,COLOR_GREY," You are not a Taxi Driver !"); return 1; } } return 1; |