16.09.2012, 14:16
Hello, i have a small problem that i cant fix..
When I enter the vehicle the label changes to lala but when I exit the vehicle, the label doesn't changes back..
PHP код:
if(newstate == PLAYER_STATE_PASSENGER || newstate == PLAYER_STATE_DRIVER)
{
Update3DTextLabelText(VehicleInfo[car][labelID], COLOR_BRIGHTRED, "lala");
}
if((oldstate == PLAYER_STATE_PASSENGER && newstate == PLAYER_STATE_ONFOOT) || (oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_ONFOOT))
{
if(VehicleInfo[car][Buyable] == 0 && !strcmp(VehicleInfo[car][CarOwner], "none", true))
{
Update3DTextLabelText(VehicleInfo[car][labelID], COLOR_BRIGHTRED, "Public");
}
else if(VehicleInfo[car][Buyable] == 0 && strcmp(VehicleInfo[car][CarOwner], "none", true))
{
Update3DTextLabelText(VehicleInfo[car][labelID], COLOR_ORANGE, VehicleInfo[car][CarOwner]);
}
else
{
Update3DTextLabelText(VehicleInfo[car][labelID], COLOR_LIGHTGREEN, "Buy");
}
}