Jo, mein megaphone befehl hat das problem:
Wenn ich es eingebe, erscheint der TextLabel zwar verschwinder nach dem timer aber nicht mehr, was tun?
Code:
PAWN Quelltext
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
CMD:m(playerid,params[])
{
new Name[MAX_PLAYER_NAME];
new string[128],text[128];
new Float:X,Float:Y,Float:Z;
GetPlayerName(playerid,Name,sizeof(Name));
GetPlayerPos(playerid,X,Y,Z);
SetTimer("megaphone",5000,false);
for(new i=0; i<MAX_PLAYERS; i++)
{
if(sscanf(params,"s",text))return SendClientMessage(playerid, 0xFF0000AA, "Benutzung: /m [Text]");
{
format(string,sizeof(string),"**(( Army Soldier %s: %s ))**", Name, text);
label = Create3DTextLabel(string, 0xFFFF00AA,30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.7);
}
if(IsPlayerInRangeOfPoint(i, 40.0, X, Y, Z))
{
SendClientMessage(i,0xFFFF00AA,string);
}
}
return 1;
}
PAWN Quelltext
1
2
3
4
5
6
forward megaphone();
public megaphone()
{
Delete3DTextLabel(label);
return 1;
}
MfG