23.04.2014, 13:30
Hello guys again.
I'm having some problems while setting Tire health:
No matter what i write ,all tires health will be set to the same value , how to make it deacrease randomly?
I'm having some problems while setting Tire health:
pawn Код:
if(GetPlayerSpeed(i) > 0)
{
if(TireInfo[vehicleid][Front_Left_Tire] != 0 || TireInfo[vehicleid][Front_Right_Tire] != 0 || TireInfo[vehicleid][Rear_Right_Tire] != 0 || TireInfo[vehicleid][Rear_Left_Tire] != 0)
{
if(PlayerInfo[i][Turning] == 1)
{
new string0[100],string1[100],string2[100],string3[100];
TireInfo[vehicleid][Front_Left_Tire] = TireInfo[vehicleid][Front_Right_Tire]-4; //Here
TireInfo[vehicleid][Front_Right_Tire] = TireInfo[vehicleid][Front_Right_Tire]-(2+1);//here
TireInfo[vehicleid][Rear_Right_Tire] = TireInfo[vehicleid][Rear_Right_Tire]-(1+3);//here
TireInfo[vehicleid][Rear_Left_Tire] = TireInfo[vehicleid][Rear_Left_Tire]-(3+4);//here
format(string0 , sizeof(string0) , "{33ff66}%d {ff0000} priekine kaire padanga.",TireInfo[vehicleid][Front_Left_Tire]);
format(string1 , sizeof(string1) , "{33ff66}%d {ff0000} priekine desine padanga.",TireInfo[vehicleid][Front_Right_Tire]);
format(string2 , sizeof(string2) , "{33ff66}%d {ff0000} galine kaire padanga.",TireInfo[vehicleid][Rear_Left_Tire]);
format(string3 , sizeof(string3) , "{33ff66}%d {ff0000} galine desine padanga.",TireInfo[vehicleid][Rear_Right_Tire]);
SendClientMessage(i,COLOR_RED,string0);
SendClientMessage(i,COLOR_RED,string1);
SendClientMessage(i,COLOR_RED,string2);
SendClientMessage(i,COLOR_RED,string3);
}
}
}