change job payment - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: change job payment (
/showthread.php?tid=525208)
change job payment -
Acres - 10.07.2014
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!
Respuesta: change job payment -
Xabi - 10.07.2014
Maximum vehicle health is 1000, so it will only give from 381$ to 1000$
Re: change job payment -
Acres - 10.07.2014
but how i can change it? because if i try chaning
Код:
if(health >= 6000) {
and
then nothing happens...
(( i wanna increase it to 10k if you can drive it undamaged ))
Re: change job payment -
Stanford - 10.07.2014
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
Use
so it will be set to 10k, brinks can be like 200 before and suddenly instead of 10k given it will give $10200.
Re: change job payment -
Acres - 10.07.2014
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 {