21.09.2015, 18:46
O lucro das empresas do meu servidor esta ficando negativo, porque isso esta acontecendo ? :/
Marзo mande o cуdigo de onde seta o lucro de sua empresa!
|
new ABusinessInteriors[][TBusinessType] = { {"Dummy", 0, 0.0, 0.0, 0.0, 0, 0, 0}, // Dummy business (Type 0) {"Tattoo LS", 16, -203.0, -24.25, 1002.3, 1000000, 250, 39}, // Tipo 1 (Ganhos por Dia: $ 6000) {"Clube de Strip (pequeno)", 3, 1212.75, -30.0, 1001.0, 1000000, 250, 48}, // Tipo 2 (Ganhos por Dia: $ 6000) {"Clube de Strip (grande)", 2, 1204.75, -12.5, 1001.0, 1500000, 500, 48}, // Tipo 3 (Ganhos por Dia: $ 12000) };
ele quer o codigo, da hora em que dб o payday, e da a grana para as empresas...
|
Business_PayEarnings(playerid, BusID) { new Msg[2000]; new BusType = ABusinessData[BusID][BusinessType]; new Earnings = (BusinessTransactionTime - ABusinessData[BusID][LastTransaction]) * ABusinessInteriors[BusType][BusEarnings] * ABusinessData[BusID][BusinessLevel]; ABusinessData[BusID][LastTransaction] = BusinessTransactionTime; RewardPlayer(playerid, Earnings, 0); format(Msg, 2000, "{3A3A3A}Sua empresa lucrou {FFFFFF}R$%i{3A3A3A} desde a sua ъltima retirada.", Earnings); SendClientMessage(playerid, 0xFFFFFFFF, Msg); }
acredito que seja aqui..
Код:
Business_PayEarnings(playerid, BusID) { new Msg[2000]; new BusType = ABusinessData[BusID][BusinessType]; new Earnings = (BusinessTransactionTime - ABusinessData[BusID][LastTransaction]) * ABusinessInteriors[BusType][BusEarnings] * ABusinessData[BusID][BusinessLevel]; ABusinessData[BusID][LastTransaction] = BusinessTransactionTime; RewardPlayer(playerid, Earnings, 0); format(Msg, 2000, "{3A3A3A}Sua empresa lucrou {FFFFFF}R$%i{3A3A3A} desde a sua ъltima retirada.", Earnings); SendClientMessage(playerid, 0xFFFFFFFF, Msg); } |
new Msg[2000];
ABusinessInteriors[BusType][BusEarnings]
Earnings = (BusinessTransactionTime + ABusinessData[BusID][LastTransaction] * ABusinessInteriors[BusType][BusEarnings] * ABusinessData[BusID][BusinessLevel]) / 100;