My mind is stopped, some1 fix this pls...
#1

Код:
dcmd_xyz(playerid, params[])
{
//	#pragma unused params
//	#pragma unused playerid
	new str[128];
	new taaq;
	
	if(sscanf(params, "d", taaq))
	{
	    format(str, sizeof(str), "Textdraw%d", taaq);
		TextDrawHideForPlayer(playerid, str);
	}
	
return 1;
}
Код:
error 035: argument type mismatch (argument 2)  >>> TextDrawHideForPlayer(playerid, str);
Reply
#2

What the hell are you trying to achieve here? I can't understand ...

First of all, you used:
pawn Код:
#pragma unused params
which means you don't use parameters.

Then, you used sscanf, which means you use parameters.

Then you hide the textdraw for player? What ....
Reply
#3

TextDrawHideForPlayer(playerid, Textdraw[playerid]);

https://sampwiki.blast.hk/wiki/TextDrawHideForPlayer
Reply
#4

it has "//" in the start..

TextDrawHideForPlayer(playerid, Textdraw59);

^works for me, but when i use it with "string", i get this error..
Reply
#5

You can't hide TextDraws like that.

TextDrawHide requires the textid parameter to hide it.

So, the cmd should be:
pawn Код:
dcmd_xyz(playerid, params[])
{
    new textid;
    if(!sscanf(params, "d", textid))
    {
        TextDrawHideForPlayer(playerid, textid);
    } else SendClientMessage(playerid, 0xFF0000FF, "Usage: /xyz [Text ID]");
    return 1;
}
Reply
#6

I know this, ur right. But i just didn't want to type "Textdraw", only wanted to do it with numbers only

Anyway, that was what i wanted to know, thanks.
Reply
#7

The textdraw id is type Text:
pawn Код:
new Text:textid;
Reply
#8

Did you added your textdraw first? i mean did you created it?
Reply
#9

Yeah, i did. None of those worked btw, still getting the mismatch error.
Reply
#10

I don't know if this will work, but try it:
pawn Код:
TextDrawHideForPlayer(playerid, Text:textid); //Replace this in my code posted earlier.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)