26.04.2018, 13:08
(
Последний раз редактировалось Bruno13; 26.04.2018 в 13:39.
)
I don't understand yet what is your problem, if is the variable float that don't change or the output that can't be in float, or both.
Anyway, your code need a better performece and you need more debugs to know what is the problem.
Btw, your specifier in debug message are wrong, to float is used %f.
Look this:
Anyway, your code need a better performece and you need more debugs to know what is the problem.
Btw, your specifier in debug message are wrong, to float is used %f.
Look this:
PHP код:
new Float:kof = 1;//str[400];
//debugs
printf("playerDB admin level = %d", playerDB[i][admin]);
printf("playerDB vip level = %d", playerDB[i][vip]);
switch(playerDB[i][admin])
{
case 5: kof = 2;
case 4: kof = 2;
case 3: kof = 1;
case 2: kof = 0.7;
case 1: kof = 0.4;
default:
{
if(playerDB[i][vip]) kof = 0.2;
}
}
printf("kof output = %.1f", kof);//.1 = only one decimal place
playerDB[i][VersloPelnas] += playerDB[i][VersloPajamos];
//format(str, sizeof(str), "Verslo koficijentas yra %d", kof);
//SendClientMessage(i, RED, str );