PDA

View Full Version : 3D Label Not showing


Gamer_007
06/02/2013, 08:54 AM
Guys my 3D Label is not showing to Passanger and other players cant see it too.Only who can see the Labe lis Driver.I need to show it to all players if a single person is in vehicle so all people can see the Label.I tried
if(GetPlayetState(playerid) == PLAYER_STATE_DRIVER || GetPlayerstate(playerid) == PLAYER_STATE_PASSENGER)

But it is not working

public OnPlayerUpdate(playerid)
{
new Float:Health;
GetVehicleHealth(GetPlayerVehicleID(playerid),Heal th);
new vspeed;
vspeed = GetVehicleSpeed(GetPlayerVehicleID(playerid));
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER || GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
{
if(HB[playerid] == 1 && Boost[playerid] == 1 && Lock[playerid] == 1)
{
format(SpeedoStr, sizeof(SpeedoStr), "\n\n\n\n\n{05BDFA}Speed: %d km/hr%s\n{05BDFA}Health:[%s{05BDFA}]\nBoost:Online\nHandbrake:Activated\n{05BDFA}Secur ity:Locked\nUse /vehctrl", vspeed,UpdateLabelOfSpeed(playerid),UpdateString(p layerid));
UpdatePlayer3DTextLabelText(playerid,Speedo[playerid],0xFF0000FF,SpeedoStr);
}
if(HB[playerid] == 1 && Boost[playerid] == 0 && Lock[playerid] == 1)
{
format(SpeedoStr, sizeof(SpeedoStr), "\n\n\n\n\n{05BDFA}Speed: %d km/hr%s\n{05BDFA}Health:[%s{05BDFA}]\nBoost:{FF0000}Offline\n{05BDFA}Handbrake:Activat ed\n{05BDFA}Security:Locked\nUse /vehctrl", vspeed,UpdateLabelOfSpeed(playerid),UpdateString(p layerid));
UpdatePlayer3DTextLabelText(playerid,Speedo[playerid],0xFF0000FF,SpeedoStr);

}
if(HB[playerid] == 1 && Boost[playerid] == 1 && Lock[playerid] == 0)
{
format(SpeedoStr, sizeof(SpeedoStr), "\n\n\n\n\n{05BDFA}Speed: %d km/hr%s\n{05BDFA}Health:[%s{05BDFA}]\nBoost:Online\n{05BDFA}Handbrake:Activated\n{05BD FA}Security:Unlocked\nUse /vehctrl", vspeed,UpdateLabelOfSpeed(playerid),UpdateString(p layerid));
UpdatePlayer3DTextLabelText(playerid,Speedo[playerid],0xFF0000FF,SpeedoStr);

}
if(HB[playerid] == 0 && Boost[playerid] == 1 && Lock[playerid] == 1)
{
format(SpeedoStr, sizeof(SpeedoStr), "\n\n\n\n\n{05BDFA}Speed: %d km/hr%s\n{05BDFA}Health:[%s{05BDFA}]\nBoost:Online\n{05BDFA}Handbrake:{FF0000}De-Activated\n{05BDFA}Security:Locked\nUse /vehctrl", vspeed,UpdateLabelOfSpeed(playerid),UpdateString(p layerid));
UpdatePlayer3DTextLabelText(playerid,Speedo[playerid],0xFF0000FF,SpeedoStr);

}
if(HB[playerid] == 0 && Boost[playerid] == 0 && Lock[playerid] == 0)
{
format(SpeedoStr, sizeof(SpeedoStr), "\n\n\n\n\n{05BDFA}Speed: %d km/hr%s\n{05BDFA}Health:[%s{05BDFA}]\nBoost:{FF0000}Offline\n{05BDFA}Handbrake:{FF0000 }De-Activated\n{05BDFA}Security:Unlocked\nUse /vehctrl", vspeed,UpdateLabelOfSpeed(playerid),UpdateString(p layerid));
UpdatePlayer3DTextLabelText(playerid,Speedo[playerid],0xFF0000FF,SpeedoStr);

}
if(HB[playerid] == 0 && Boost[playerid] == 1 && Lock[playerid] == 0)
{
format(SpeedoStr, sizeof(SpeedoStr), "\n\n\n\n\n{05BDFA}Speed: %d km/hr%s\n{05BDFA}Health:[%s{05BDFA}]\nBoost:Online\n{05BDFA}Handbrake:{FF0000}De-Activated\n{05BDFA}Security:Unlocked\nUse /vehctrl", vspeed,UpdateLabelOfSpeed(playerid),UpdateString(p layerid));
UpdatePlayer3DTextLabelText(playerid,Speedo[playerid],0xFF0000FF,SpeedoStr);

}
if(HB[playerid] == 0 && Boost[playerid] == 0 && Lock[playerid] == 1)
{
format(SpeedoStr, sizeof(SpeedoStr), "\n\n\n\n\n{05BDFA}Speed: %d km/hr%s\n{05BDFA}Health:[%s{05BDFA}]\nBoost:Online\n{05BDFA}Handbrake:{FF0000}De-Activated\n{05BDFA}Security:Locked\nUse /vehctrl", vspeed,UpdateLabelOfSpeed(playerid),UpdateString(p layerid));
UpdatePlayer3DTextLabelText(playerid,Speedo[playerid],0xFF0000FF,SpeedoStr);

}
return 1;
}


return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
new Float:Health;
GetVehicleHealth(GetPlayerVehicleID(playerid),Heal th);
new vspeed;
vspeed = GetVehicleSpeed(GetPlayerVehicleID(playerid));
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER || GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
{
if(HB[playerid] == 1 && Boost[playerid] == 1 && Lock[playerid] == 1)
{
format(SpeedoStr, sizeof(SpeedoStr), "\n\n\n\n\n{05BDFA}Speed: %d km/hr%s\n{05BDFA}Health:[%s{05BDFA}]\nBoost:Online\nHandbrake:Activated\n{05BDFA}Secur ity:Locked\nUse /vehctrl", vspeed,UpdateLabelOfSpeed(playerid),UpdateString(p layerid));
UpdatePlayer3DTextLabelText(playerid,Speedo[playerid],0xFF0000FF,SpeedoStr);
}
if(HB[playerid] == 1 && Boost[playerid] == 0 && Lock[playerid] == 1)
{
format(SpeedoStr, sizeof(SpeedoStr), "\n\n\n\n\n{05BDFA}Speed: %d km/hr%s\n{05BDFA}Health:[%s{05BDFA}]\nBoost:{FF0000}Offline\n{05BDFA}Handbrake:Activat ed\n{05BDFA}Security:Locked\nUse /vehctrl", vspeed,UpdateLabelOfSpeed(playerid),UpdateString(p layerid));
UpdatePlayer3DTextLabelText(playerid,Speedo[playerid],0xFF0000FF,SpeedoStr);

}
if(HB[playerid] == 1 && Boost[playerid] == 1 && Lock[playerid] == 0)
{
format(SpeedoStr, sizeof(SpeedoStr), "\n\n\n\n\n{05BDFA}Speed: %d km/hr%s\n{05BDFA}Health:[%s{05BDFA}]\nBoost:Online\n{05BDFA}Handbrake:Activated\n{05BD FA}Security:Unlocked\nUse /vehctrl", vspeed,UpdateLabelOfSpeed(playerid),UpdateString(p layerid));
UpdatePlayer3DTextLabelText(playerid,Speedo[playerid],0xFF0000FF,SpeedoStr);

}
if(HB[playerid] == 0 && Boost[playerid] == 1 && Lock[playerid] == 1)
{
format(SpeedoStr, sizeof(SpeedoStr), "\n\n\n\n\n{05BDFA}Speed: %d km/hr%s\n{05BDFA}Health:[%s{05BDFA}]\nBoost:Online\n{05BDFA}Handbrake:{FF0000}De-Activated\n{05BDFA}Security:Locked\nUse /vehctrl", vspeed,UpdateLabelOfSpeed(playerid),UpdateString(p layerid));
UpdatePlayer3DTextLabelText(playerid,Speedo[playerid],0xFF0000FF,SpeedoStr);

}
if(HB[playerid] == 0 && Boost[playerid] == 0 && Lock[playerid] == 0)
{
format(SpeedoStr, sizeof(SpeedoStr), "\n\n\n\n\n{05BDFA}Speed: %d km/hr%s\n{05BDFA}Health:[%s{05BDFA}]\nBoost:{FF0000}Offline\n{05BDFA}Handbrake:{FF0000 }De-Activated\n{05BDFA}Security:Unlocked\nUse /vehctrl", vspeed,UpdateLabelOfSpeed(playerid),UpdateString(p layerid));
UpdatePlayer3DTextLabelText(playerid,Speedo[playerid],0xFF0000FF,SpeedoStr);

}
if(HB[playerid] == 0 && Boost[playerid] == 1 && Lock[playerid] == 0)
{
format(SpeedoStr, sizeof(SpeedoStr), "\n\n\n\n\n{05BDFA}Speed: %d km/hr%s\n{05BDFA}Health:[%s{05BDFA}]\nBoost:Online\n{05BDFA}Handbrake:{FF0000}De-Activated\n{05BDFA}Security:Unlocked\nUse /vehctrl", vspeed,UpdateLabelOfSpeed(playerid),UpdateString(p layerid));
UpdatePlayer3DTextLabelText(playerid,Speedo[playerid],0xFF0000FF,SpeedoStr);

}
return 1;
}
return 1;
}

Help please ???

zde5
06/02/2013, 09:05 AM
use Create3DTextLabel http://wiki.sa-mp.com/wiki/Create3DTextLabel instead of CreatePlayer3DTextLabel http://wiki.sa-mp.com/wiki/CreatePlayer3DTextLabel

Gamer_007
06/02/2013, 09:20 AM
here is the error log

E:\X\SAMP\samp\samp03e_svr_R2_win32\filterscripts\ carlabel.pwn(264) : warning 213: tag mismatch
E:\X\SAMP\samp\samp03e_svr_R2_win32\filterscripts\ carlabel.pwn(269) : warning 213: tag mismatch
E:\X\SAMP\samp\samp03e_svr_R2_win32\filterscripts\ carlabel.pwn(275) : warning 213: tag mismatch
E:\X\SAMP\samp\samp03e_svr_R2_win32\filterscripts\ carlabel.pwn(281) : warning 213: tag mismatch
E:\X\SAMP\samp\samp03e_svr_R2_win32\filterscripts\ carlabel.pwn(287) : warning 213: tag mismatch
E:\X\SAMP\samp\samp03e_svr_R2_win32\filterscripts\ carlabel.pwn(293) : warning 213: tag mismatch
E:\X\SAMP\samp\samp03e_svr_R2_win32\filterscripts\ carlabel.pwn(299) : warning 213: tag mismatch
E:\X\SAMP\samp\samp03e_svr_R2_win32\filterscripts\ carlabel.pwn(328) : warning 213: tag mismatch
E:\X\SAMP\samp\samp03e_svr_R2_win32\filterscripts\ carlabel.pwn(333) : warning 213: tag mismatch
E:\X\SAMP\samp\samp03e_svr_R2_win32\filterscripts\ carlabel.pwn(339) : warning 213: tag mismatch
E:\X\SAMP\samp\samp03e_svr_R2_win32\filterscripts\ carlabel.pwn(345) : warning 213: tag mismatch
E:\X\SAMP\samp\samp03e_svr_R2_win32\filterscripts\ carlabel.pwn(351) : warning 213: tag mismatch
E:\X\SAMP\samp\samp03e_svr_R2_win32\filterscripts\ carlabel.pwn(357) : warning 213: tag mismatch
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


13 Warnings.

here is wht u told
public OnPlayerUpdate(playerid)
{
new Float:Health;
GetVehicleHealth(GetPlayerVehicleID(playerid),Heal th);
new vspeed;
vspeed = GetVehicleSpeed(GetPlayerVehicleID(playerid));
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER || GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
{
if(HB[playerid] == 1 && Boost[playerid] == 1 && Lock[playerid] == 1)
{
format(SpeedoStr, sizeof(SpeedoStr), "\n\n\n\n\n{05BDFA}Speed: %d km/hr%s\n{05BDFA}Health:[%s{05BDFA}]\nBoost:Online\nHandbrake:Activated\n{05BDFA}Secur ity:Locked\nUse /vehctrl", vspeed,UpdateLabelOfSpeed(playerid),UpdateString(p layerid));
Update3DTextLabelText(Speedo[playerid],0xFF0000FF,SpeedoStr);
}
if(HB[playerid] == 1 && Boost[playerid] == 0 && Lock[playerid] == 1)
{
format(SpeedoStr, sizeof(SpeedoStr), "\n\n\n\n\n{05BDFA}Speed: %d km/hr%s\n{05BDFA}Health:[%s{05BDFA}]\nBoost:{FF0000}Offline\n{05BDFA}Handbrake:Activat ed\n{05BDFA}Security:Locked\nUse /vehctrl", vspeed,UpdateLabelOfSpeed(playerid),UpdateString(p layerid));
Update3DTextLabelText(Speedo[playerid],0xFF0000FF,SpeedoStr);

}
if(HB[playerid] == 1 && Boost[playerid] == 1 && Lock[playerid] == 0)
{
format(SpeedoStr, sizeof(SpeedoStr), "\n\n\n\n\n{05BDFA}Speed: %d km/hr%s\n{05BDFA}Health:[%s{05BDFA}]\nBoost:Online\n{05BDFA}Handbrake:Activated\n{05BD FA}Security:Unlocked\nUse /vehctrl", vspeed,UpdateLabelOfSpeed(playerid),UpdateString(p layerid));
Update3DTextLabelText(Speedo[playerid],0xFF0000FF,SpeedoStr);

}
if(HB[playerid] == 0 && Boost[playerid] == 1 && Lock[playerid] == 1)
{
format(SpeedoStr, sizeof(SpeedoStr), "\n\n\n\n\n{05BDFA}Speed: %d km/hr%s\n{05BDFA}Health:[%s{05BDFA}]\nBoost:Online\n{05BDFA}Handbrake:{FF0000}De-Activated\n{05BDFA}Security:Locked\nUse /vehctrl", vspeed,UpdateLabelOfSpeed(playerid),UpdateString(p layerid));
Update3DTextLabelText(Speedo[playerid],0xFF0000FF,SpeedoStr);

}
if(HB[playerid] == 0 && Boost[playerid] == 0 && Lock[playerid] == 0)
{
format(SpeedoStr, sizeof(SpeedoStr), "\n\n\n\n\n{05BDFA}Speed: %d km/hr%s\n{05BDFA}Health:[%s{05BDFA}]\nBoost:{FF0000}Offline\n{05BDFA}Handbrake:{FF0000 }De-Activated\n{05BDFA}Security:Unlocked\nUse /vehctrl", vspeed,UpdateLabelOfSpeed(playerid),UpdateString(p layerid));
Update3DTextLabelText(Speedo[playerid],0xFF0000FF,SpeedoStr);

}
if(HB[playerid] == 0 && Boost[playerid] == 1 && Lock[playerid] == 0)
{
format(SpeedoStr, sizeof(SpeedoStr), "\n\n\n\n\n{05BDFA}Speed: %d km/hr%s\n{05BDFA}Health:[%s{05BDFA}]\nBoost:Online\n{05BDFA}Handbrake:{FF0000}De-Activated\n{05BDFA}Security:Unlocked\nUse /vehctrl", vspeed,UpdateLabelOfSpeed(playerid),UpdateString(p layerid));
Update3DTextLabelText(Speedo[playerid],0xFF0000FF,SpeedoStr);

}
if(HB[playerid] == 0 && Boost[playerid] == 0 && Lock[playerid] == 1)
{
format(SpeedoStr, sizeof(SpeedoStr), "\n\n\n\n\n{05BDFA}Speed: %d km/hr%s\n{05BDFA}Health:[%s{05BDFA}]\nBoost:Online\n{05BDFA}Handbrake:{FF0000}De-Activated\n{05BDFA}Security:Locked\nUse /vehctrl", vspeed,UpdateLabelOfSpeed(playerid),UpdateString(p layerid));
Update3DTextLabelText(Speedo[playerid],0xFF0000FF,SpeedoStr);

}
return 1;
}


return 1;
}

teomakedonija
06/02/2013, 09:31 AM
That code put on public OnTextDrawUpdate

Gamer_007
06/02/2013, 09:35 AM
OnTextDrawUpdate :confused: this is 3D Label not Textdraw

teomakedonija
06/02/2013, 09:42 AM
On3DTextUpdate * Sory :)

Gamer_007
06/02/2013, 09:43 AM
Could you show that in the code that i pasted above??