Little help -
Face9000 - 25.05.2012
This is my code,it updates the textlabel above the player level:
pawn Код:
case 1 .. 3:
{
Ticketable[i] = Create3DTextLabel("Suspect - Ticketable",yellow,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(Ticketable[i], i, 0.0, 0.0, 0.7);
DeletePlayer3DTextLabel(i, Arrestable);
SetPlayerColor(i,yellow);
}
case 4 .. 10:
{
Arrestable[i] = Create3DTextLabel("Suspect - Arrestable",red,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(Arrestable[i], i, 0.0, 0.0, 0.7);
DeletePlayer3DTextLabel(i, Ticketable);
SetPlayerColor(i,red);
The problem is here:
error 035: argument type mismatch (argument 2)
Lines:
pawn Код:
DeletePlayer3DTextLabel(i, Arrestable);
pawn Код:
DeletePlayer3DTextLabel(i, Ticketable);
Basically,this code put a 3dlabel above the player head,from 1 to 3 it's "Ticketable",then i wanna destroy the label if it's wanted level 4 from 10,showing "Arrestable",but i get that errors.
Re: Little help -
Libra_PL - 25.05.2012
Код:
case 1 .. 3:
{
Ticketable[i] = Create3DTextLabel("Suspect - Ticketable",yellow,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(Ticketable[i], i, 0.0, 0.0, 0.7);
DeletePlayer3DTextLabel(i, Arrestable[i]);
SetPlayerColor(i,yellow);
}
case 4 .. 10:
{
Arrestable[i] = Create3DTextLabel("Suspect - Arrestable",red,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(Arrestable[i], i, 0.0, 0.0, 0.7);
DeletePlayer3DTextLabel(i, Ticketable[i]);
SetPlayerColor(i,red);
This should be fine. I think you forgot the [i]'s.
Re: Little help -
Face9000 - 25.05.2012
Tag mismatch now at same lines.
Re: Little help -
iggy1 - 25.05.2012
You have given them the Text3D tag?
pawn Код:
new Text3D: Ticketable[10];
Re: Little help -
Face9000 - 25.05.2012
Quote:
Originally Posted by iggy1
You have given them the Text3D tag?
|
pawn Код:
new Text3D:Ticketable[MAX_PLAYERS];
new Text3D:Arrestable[MAX_PLAYERS];
Ofc,otherwise even the Create3DTextLabel should not work.
Re: Little help -
iggy1 - 25.05.2012
Quote:
Originally Posted by Logitech90
Ofc,otherwise even the Create3DTextLabel should not work.
|
It would, and it wouldn't even throw a warning.
Re: Little help -
Catalyst- - 25.05.2012
Replace these
pawn Код:
DeletePlayer3DTextLabel(i, Arrestable);
DeletePlayer3DTextLabel(i, Ticketable);
with these...
pawn Код:
Delete3DTextLabel(Arrestable[i]);
Delete3DTextLabel(Ticketable[i]);
Re: Little help -
Face9000 - 25.05.2012
Quote:
Originally Posted by iggy1
It would, and it wouldn't even throw a warning.
|
If i remove the "Delete3d" etc part,everything is working fine,but ingame the 2 textlabels (Arrestable and Ticketable) are overwritten on theirself,so it's mixed.I need to destroy the textlabel and create it when it's necessary.
EDIT: Catalyst it's working,thanks!
AW: Little help -
EthanR - 25.05.2012
You can't use Create3DTextLabel in combination with DeletePLAYER3DTextLabel.