Hey,
ich habe eben mal was probiert, da mir langweilig war:
public OnPlayerConnect(playerid)
{
if(Player[playerid][Wanteds] == 1)
{
Wanted[playerid] = Create3DTextLabel("Wantedlevel: 1",COLOR_RED,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(Wanted[playerid], playerid, 0.0, 0.0, 0.7);
SetTimerEx("wantedshow",1000,1,"i",playerid);
}
if(Player[playerid][Wanteds] == 2)
{
Wanted[playerid] = Create3DTextLabel("Wantedlevel: 2",COLOR_RED,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(Wanted[playerid], playerid, 0.0, 0.0, 0.7);
SetTimerEx("wantedshow",1000,1,"i",playerid);
}
if(Player[playerid][Wanteds] == 3)
{
Wanted[playerid] = Create3DTextLabel("Wantedlevel: 3",COLOR_RED,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(Wanted[playerid], playerid, 0.0, 0.0, 0.7);
SetTimerEx("wantedshow",1000,1,"i",playerid);
}
if(Player[playerid][Wanteds] == 4)
{
Wanted[playerid] = Create3DTextLabel("Wantedlevel: 4",COLOR_RED,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(Wanted[playerid], playerid, 0.0, 0.0, 0.7);
SetTimerEx("wantedshow",1000,1,"i",playerid);
}
if(Player[playerid][Wanteds] == 5)
{
Wanted[playerid] = Create3DTextLabel("Wantedlevel: 5",COLOR_RED,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(Wanted[playerid], playerid, 0.0, 0.0, 0.7);
SetTimerEx("wantedshow",1000,1,"i",playerid);
}
if(Player[playerid][Wanteds] == 6)
{
Wanted[playerid] = Create3DTextLabel("Wantedlevel: 6",COLOR_RED,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(Wanted[playerid], playerid, 0.0, 0.0, 0.7);
SetTimerEx("wantedshow",1000,1,"i",playerid);
}
So.
Jetzt hab ich den public erstellt:
public wantedshow(playerid)
{
Update3DTextLabelText(Wanted,COLOR_RED,"Wantedlevel: %d!)",Wanteds;
SetTimerEx("wantedshow",1000,1,"i",playerid);
}
Und da sagt er Errors.
Erstmal ist mir wichtig, ob das so richtig ist & co.