SA-MP Forums Archive
Textdraw problem[REP] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Textdraw problem[REP] (/showthread.php?tid=557895)



Textdraw problem[REP] - Kruno88 - 15.01.2015

Код:
C:\Users\Andrijana\Desktop\COD WAW gamemodes\Untitled.pwn(153) : warning 217: loose indentation
C:\Users\Andrijana\Desktop\COD WAW\gamemodes\Untitled.pwn(153) : error 035: argument type mismatch (argument 2)
C:\Users\Andrijana\Desktop\COD WAW \gamemodes\Untitled.pwn(154) : error 035: argument type mismatch (argument 2)
C:\Users\Andrijana\Desktop\COD WAW \gamemodes\Untitled.pwn(155) : error 035: argument type mismatch (argument 2)
C:\Users\Andrijana\Desktop\COD WAW \gamemodes\Untitled.pwn(156) : error 035: argument type mismatch (argument 2)
C:\Users\Andrijana\Desktop\COD WAW \gamemodes\Untitled.pwn(157) : error 035: argument type mismatch (argument 2)
C:\Users\Andrijana\Desktop\COD WAW \gamemodes\Untitled.pwn(158) : error 035: argument type mismatch (argument 2)
C:\Users\Andrijana\Desktop\COD WAW \gamemodes\Untitled.pwn(159) : error 035: argument type mismatch (argument 2)
C:\Users\Andrijana\Desktop\COD WAW \gamemodes\Untitled.pwn(160) : error 035: argument type mismatch (argument 2)
C:\Users\Andrijana\Desktop\COD WAW \gamemodes\Untitled.pwn(161) : error 035: argument type mismatch (argument 2)
Код:
    TextDrawShowForPlayer(playerid, Textdraw0);
    TextDrawShowForPlayer(playerid, Textdraw1);
    TextDrawShowForPlayer(playerid, Textdraw2);
    TextDrawShowForPlayer(playerid, Textdraw3);
    TextDrawShowForPlayer(playerid, Textdraw4);
    TextDrawShowForPlayer(playerid, Textdraw5);
    TextDrawShowForPlayer(playerid, Textdraw6);
    TextDrawShowForPlayer(playerid, Textdraw7);
	TextDrawShowForPlayer(playerid, Textdraw8);
Yes I need some help!

Код:
new PlayerText:Textdraw0[MAX_PLAYERS];
new PlayerText:Textdraw1[MAX_PLAYERS];
new PlayerText:Textdraw2[MAX_PLAYERS];
new PlayerText:Textdraw3[MAX_PLAYERS];
new PlayerText:Textdraw4[MAX_PLAYERS];
new PlayerText:Textdraw5[MAX_PLAYERS];
new PlayerText:Textdraw6[MAX_PLAYERS];
new PlayerText:Textdraw7[MAX_PLAYERS];
new PlayerText:Textdraw8[MAX_PLAYERS];
Example of how I make my textdraws

Код:
Textdraw0[playerid] = CreatePlayerTextDraw(playerid, 259.599945, 153.073333, "usebox");
PlayerTextDrawLetterSize(playerid, Textdraw0[playerid], 0.000000, 1.532219);
PlayerTextDrawTextSize(playerid, Textdraw0[playerid], 31.599998, 0.000000);
PlayerTextDrawAlignment(playerid, Textdraw0[playerid], 1);
PlayerTextDrawColor(playerid, Textdraw0[playerid], 0);
PlayerTextDrawUseBox(playerid, Textdraw0[playerid], true);
PlayerTextDrawBoxColor(playerid, Textdraw0[playerid], 102);
PlayerTextDrawSetShadow(playerid, Textdraw0[playerid], 0);
PlayerTextDrawSetOutline(playerid, Textdraw0[playerid], 0);
PlayerTextDrawFont(playerid, Textdraw0[playerid], 0);



Re: Textdraw problem[REP] - Schneider - 15.01.2015

Use PlayerTextDrawShow instead of TextDrawShowForPlayer to show PlayerTextdraws


Respuesta: Textdraw problem[REP] - JuanStone - 15.01.2015

Code incorrect.


Re: Textdraw problem[REP] - Kruno88 - 15.01.2015

Quote:
Originally Posted by Schneider
Посмотреть сообщение
Use PlayerTextDrawShow instead of TextDrawShowForPlayer to show PlayerTextdraws
Thanx,but now I have this problem:

Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(clickedid == Textdraw4[playerid]) //this
    {
//TS3
    }
    if(clickedid == Textdraw2[playerid])
    {
//Login
    }
        if(clickedid == Textdraw1[playerid])
    {
//TS
    }
    return 1;
}
Код:
warning 213: tag mismatch
+REP


Re: Textdraw problem[REP] - Schneider - 15.01.2015

There's a difference between Textdraws and PlayerTextdraws, so if you're using PlayerTextdraws, you should use the OnPlayerClickPlayerTextDraw callback instead of OnPlayerClickTextDraw

Here you can find all info about (Player)Textdraws:
https://sampwiki.blast.hk/wiki/Textdraw


Re: Textdraw problem[REP] - Kruno88 - 15.01.2015

Quote:
Originally Posted by Schneider
Посмотреть сообщение
Use PlayerTextDrawShow instead of TextDrawShowForPlayer to show PlayerTextdraws
Quote:
Originally Posted by Schneider
Посмотреть сообщение
There's a difference between Textdraws and PlayerTextdraws, so if you're using PlayerTextdraws, you should use the OnPlayerClickPlayerTextDraw callback instead of OnPlayerClickTextDraw

Here you can find all info about (Player)Textdraws:
https://sampwiki.blast.hk/wiki/Textdraw
I use playertextdraws...Can you just help me?I have no idea how to fix it I've tried everything.


Re: Textdraw problem[REP] - Schneider - 15.01.2015

I just did.. please read everything on the site i gave you and don't forget to click all the links on that page. If you don't understand after you read it, read it again. Don't worry, these things will take some days to learn.

Start a new empty script, experiment with the codes you can find on this wiki and test it on your server. Change some values and see how it effects it. Once you understand how it works you apply it to your actual script.


Re: Textdraw problem[REP] - Kruno88 - 15.01.2015

Quote:
Originally Posted by Schneider
Посмотреть сообщение
I just did.. please read everything on the site i gave you and don't forget to click all the links on that page. If you don't understand after you read it, read it again. Don't worry, these things will take some days to learn.

Start a new empty script, experiment with the codes you can find on this wiki and test it on your server. Change some values and see how it effects it. Once you understand how it works you apply it to your actual script.
I regret I gave you REP