Little help
#1

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.
Reply
#2

Код:
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.
Reply
#3

Tag mismatch now at same lines.
Reply
#4

You have given them the Text3D tag?

pawn Код:
new Text3D: Ticketable[10];
Reply
#5

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.
Reply
#6

Quote:
Originally Posted by Logitech90
Посмотреть сообщение
Ofc,otherwise even the Create3DTextLabel should not work.
It would, and it wouldn't even throw a warning.
Reply
#7

Replace these
pawn Код:
DeletePlayer3DTextLabel(i, Arrestable);

DeletePlayer3DTextLabel(i, Ticketable);
with these...
pawn Код:
Delete3DTextLabel(Arrestable[i]);

Delete3DTextLabel(Ticketable[i]);
Reply
#8

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!
Reply
#9

You can't use Create3DTextLabel in combination with DeletePLAYER3DTextLabel.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)