Show Spawn protection
#1

hi,

on my server all spawned plaayers get 10 secs of spawn kill protection.
But is there a method i can show other players that a player is spawn protected?
E.g. with a flashin health bar over the head or sth. like that?
How would i do that?

thx in advance.
Reply
#2

mhh, thx for ur answer but that would be a very bad way to show spawn protection!
Just imagine how the mainchat would be spammed if there are about 20-30 players online...

//edit

really? it starts flashing if set to 99999?
Reply
#3

Quote:
Originally Posted by BlackWolf120
Посмотреть сообщение
mhh, thx for ur answer but that would be a very bad way to show spawn protection!
Just imagine how the mainchat would be spammed if there are about 20-30 players online...

//edit

really? it starts flashing if set to 99999?
The easiest and the simplest way:

Код:
SetPlayerChatBubble(playerid, "Spawn Protected!", 50.0, 10000);
Reply
#4

You could attach a 3DTextLabel to the player or use a chat bubble
Reply
#5

also tried it with chat bubble already but it does not work for me cause i use 3d text labels attached to every player to display their rank and chat bubble does not work in combination with 3dtext labels.
Reply
#6

Quote:
Originally Posted by BlackWolf120
Посмотреть сообщение
also tried it with chat bubble already but it does not work for me cause i use 3d text labels attached to every player to display their rank and chat bubble does not work in combination with 3dtext labels.
Can you post your 3d labels for a player here, maybe We or I can do something with that to help you
Reply
#7

pawn Код:
//OnPlayerSpawn
SetPlayerChatBubble(playerid,"Spawn-Kill Protected",0xFF9900AA, 100.0,10000);
Add3DTextLabelToPlayer(playerid);


//stock
stock Add3DTextLabelToPlayer(playerid)
{
            //Labels
           
    ranklabelCTU[playerid] = Create3DTextLabel("{1464F4}CTU",0xF97804FF,30.0,40.0,50.0,30,-1,1);
    ranklabelSNAKES[playerid] = Create3DTextLabel("{CC3232}Coral Snake",0xF97804FF,30.0,40.0,50.0,30,-1,1);


    {
    switch (gTeam[playerid])
    {
    case 1: //police
    {
    Attach3DTextLabelToPlayer(ranklabelCTU[playerid], playerid, 0.0, 0.0, 0.5);
    new labelstring[50];
    format(labelstring, sizeof(labelstring), "Police %s", RankName[pRank[playerid]]);
    Update3DTextLabelText(ranklabelCTU[playerid], 0xF97804FF, labelstring);
    }

    case 2: //terrorists
    {
    Attach3DTextLabelToPlayer(ranklabelSNAKES[playerid], playerid, 0.0, 0.0, 0.5);
    new labelstring[50];
    format(labelstring, sizeof(labelstring), "Terrorist %s", RankName[pRank[playerid]]);
    Update3DTextLabelText(ranklabelSNAKES[playerid], 0xF97804FF, labelstring);
    }
    }

    }
}
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)