22.06.2013, 07:09
(
Последний раз редактировалось JimmyCh; 22.06.2013 в 09:25.
)
Hello everyone,
I have started a gamemode recently, but I'm having a small problem with the 3D Text.
If you /switchteam it will keep the previous 3D text although I have tried Update3DTextLabelText and also Delete3DTextLabel on player death.
OnPlayerSpawn I have this:
How can I make it that if you /switchteam it will delete the previous text?
Would be great if someone helps me
I have started a gamemode recently, but I'm having a small problem with the 3D Text.
If you /switchteam it will keep the previous 3D text although I have tried Update3DTextLabelText and also Delete3DTextLabel on player death.
OnPlayerSpawn I have this:
PHP код:
public OnPlayerSpawn(playerid)
{
SetPlayerVirtualWorld(playerid, 0);
switch( GetPlayerTeam( playerid ) )
{
case TEAM_ONE:
{
SetPlayerArmour(playerid, 99.0);
SendClientMessage( playerid, TEAM_RED_COLOR, "You are now playing in the Red Team." );
label7[playerid] = Create3DTextLabel("RED TEAM PLAYER",TEAM_RED_COLOR, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(label7[playerid], playerid, 0.0, 0.0, 0.4);
}
case TEAM_TWO:
{
SetPlayerArmour(playerid, 99.0);
SendClientMessage( playerid, TEAM_BLUE_COLOR, "You are now playing in the Blue Team." );
label7[playerid] = Create3DTextLabel("BLUE TEAM PLAYER",TEAM_BLUE_COLOR, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(label7[playerid], playerid, 0.0, 0.0, 0.4);
}
case TEAM_THREE:
{
SetPlayerArmour(playerid, 99.0);
SendClientMessage( playerid, TEAM_GREEN_COLOR, "You are now playing in the Green Team." );
label7[playerid] = Create3DTextLabel("GREEN TEAM PLAYER",TEAM_GREEN_COLOR, 30.0, 40.0,50.0,40.0, 0);
Attach3DTextLabelToPlayer(label7[playerid], playerid, 0.0, 0.0, 0.4);
}
}
return true;
}
Would be great if someone helps me
