31.03.2013, 12:36
Hi, I need help with 3dtextlabel. SS:
new str[24];//Let us declare a new variable
format(str,sizeof(str), "%s", NickWys(playerid));//Let's use our variable to store the players name
Create3DTextLabel(str,KOLOR_PBIALY,0.0,0.0,0.0,20.0,-1,0);//Use the variable 'str'
stock NickWys(playerid)
{
new nick[64], nickname[MAX_PLAYER_NAME];
GetPlayerName(playerid,nickname,MAX_PLAYER_NAME);
UnderscoreToSpace(nickname);
format(nick, sizeof(nick), "%s (ID: %d)", nickname, playerid);
strmid(NickCzatx[playerid],nickname, 0, 64, 64);
}
stock NickWys(playerid)
{
new nick[64], nickname[MAX_PLAYER_NAME];
GetPlayerName(playerid,nickname,MAX_PLAYER_NAME);
UnderscoreToSpace(nickname);
format(nick, sizeof(nick), "%s (ID: %d, %dh)", nickname, playerid, PlayerInfo[playerid][pGodziny]);
strmid(NickCzatx[playerid],nickname, 0, 64, 64);
if(GetPVarInt(playerid, "sluzba") == 1)
{
if(PlayerInfo[playerid][pFrakcja] == 3)
{
format(nick, sizeof(nick), "%s (%d)\n[UMAP]", nickname, playerid);
}
if(PlayerInfo[playerid][pFrakcja] == 8)
{
format(nick, sizeof(nick), ""KOLOR_APPD"%s (%d)\n[APPD]"BIALY"", nickname, playerid);
}
if(PlayerInfo[playerid][pFrakcja] == 4)
{
format(nick, sizeof(nick), "%s (%d)\n[APMC]", nickname, playerid);
}
if(PlayerInfo[playerid][pFrakcja] == 1)
{
format(nick, sizeof(nick), "%s (%d)\n[APN]", nickname, playerid);
}
if(PlayerInfo[playerid][pFrakcja] == 99)
{
format(nick, sizeof(nick), "%s (%d)\n[SAPD]", nickname, playerid);
}
}
}