17.09.2012, 06:29
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
//Obviously your variables for 'car' etc. will be here, as well as previous State Changes.
if(newstate == PLAYER_STATE_PASSENGER || newstate == PLAYER_STATE_DRIVER)
{
Update3DTextLabelText(VehicleInfo[car][labelID], COLOR_BRIGHTRED, "lala");
}
if(newstate == PLAYER_STATE_ONFOOT)
{
if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER)
{
if(VehicleInfo[car][Buyable] == 0)
{
if(strcmp(VehicleInfo[car][CarOwner], "none", true) == 0)
{
Update3DTextLabelText(VehicleInfo[car][labelID], COLOR_BRIGHTRED, "Public");
}
else if(strcmp(VehicleInfo[car][CarOwner], "none", true))
{
Update3DTextLabelText(VehicleInfo[car][labelID], COLOR_ORANGE, VehicleInfo[car][CarOwner]);
}
}
else
{
Update3DTextLabelText(VehicleInfo[car][labelID], COLOR_LIGHTGREEN, "Buy");
}
}
}
return 1;
}