change job payment
#1

hey guys i would like to need some help i need to change the jobs payment but i dont know why it dosent change...

Код:
new Float:health;
		new brinks, string[128];
		GetVehicleHealth(vehicleid, health);
		if(health >= 6000) {
		SendClientMessageEx(playerid, COLOR_YELLOW, "* You earned a bonus for returning the vehicle undamaged!");
		brinks += 10000;
		}
		else {
			brinks += floatround((health), floatround_ceil);
		}
		format(string, sizeof(string), "* You earned %d for completing the route!", brinks);
		SendClientMessageEx(playerid, COLOR_YELLOW, string);
		GivePlayerCash(playerid, brinks);
		brinks = 0;
thanks for the help!
Reply
#2

Maximum vehicle health is 1000, so it will only give from 381$ to 1000$
Reply
#3

but how i can change it? because if i try chaning

Код:
if(health >= 6000) {
and
Код:
brinks += 10000;
then nothing happens...

(( i wanna increase it to 10k if you can drive it undamaged ))
Reply
#4

According to your code, if the vehicle health is ALREADY 6000+ he gets these "bricks", but I think that the vehicle health is never going to be 6000+, as a result you have to create the code yourself so in some conditions the vehicle health is GOING to be set more than 1000.

Use
pawn Код:
SetVehicleHealth(vehicleid, your new health that is more than 1000);
And instead of
pawn Код:
brinks += 10000;
Use
pawn Код:
brinks = 10000;
so it will be set to 10k, brinks can be like 200 before and suddenly instead of 10k given it will give $10200.
Reply
#5

i think i didnt understand quite well

pawn Код:
new Float:health;
        new brinks, string[128];
        //SetVehicleHealth(vehicleid, 6000);
        GetVehicleHealth(vehicleid, health);
        SetVehicleHealth(vehicleid, 6000);/*if(health >= 6000)*/  {
        SendClientMessageEx(playerid, COLOR_YELLOW, "* You earned a bonus for returning the vehicle undamaged!");
        brinks = 10000;
        }
        else {
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)