20.07.2013, 18:37
Ok, so I'm trying to hide the 3d textlabel that is attached to a vehicle when a player enters it.. right now it just stays on the vehicle.. I keep getting an error when I compile -- error 017: undefined symbol "carid"
Below is the code that attaches the 3d text label \
below is the code to hide the text label
Below is the code that attaches the 3d text label \
Код:
{
format(Str, sizeof(Str), "%s\nOwner: %s", GetVehicleFriendlyName(carid2),vehOwnedBy);
PVInfo[carid][vpVehicleText] = Create3DTextLabel(Str, 0xFF8400FF, vehX, vehY, vehZ, 50.0, 0, 1);
}
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER) // Player entered a vehicle as a driver or passenger
{
TextDrawHideForAll(PVInfo[carid][vpVehicleText]);
}


