(clickable) textdraws are not showing ?! - 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: (clickable) textdraws are not showing ?! (
/showthread.php?tid=459938)
(clickable) textdraws are not showing ?! -
Michael@Belgium - 25.08.2013
Well, this is awkward ... but seriously, what kind of sorcery is this ? I'm making like a skin selection via clickable textdraws and their preview models:
pawn Код:
new Text:Classtextdraw[27], Text:SkinTextdraw[20];
//
public OnPlayerClickTextDraw(playerid,Text:clickedid)
{
if(clickedid == Classtextdraw[2])//trucker
{
PlayerInfo[playerid][pClass] = CLASS_TRUCKER;
SetPlayerPos(playerid,2149.2168,-2267.5007,14.4545);
SetPlayerCameraPos(playerid,2149.2168,-2267.5007,14.4545);
SetPlayerCameraLookAt(playerid,2161.4399,-2257.0442,13.3009);
}
//....
for(new i = 0; i < 27; i++) TextDrawHideForPlayer(playerid,Classtextdraw[i]);
CallSpawn(playerid);
}
//
public CallSpawn(playerid)
{
if(PlayerInfo[playerid][pClass] == CLASS_TRUCKER)
{
for(new i = 0; i < 20; i++) TextDrawShowForPlayer(playerid,SkinTextdraw[i]);
SetPlayerColor(playerid, COLOR_TRUCKER);
}
//...
}
.. but for some strange reason only 6 of them show on the player screen.
I tested like this also:
pawn Код:
CMD:test(playerid,params[])
{
//These are able to show:
TextDrawShowForPlayer(playerid,SkinTextdraw[0]);
TextDrawShowForPlayer(playerid,SkinTextdraw[1]);
TextDrawShowForPlayer(playerid,SkinTextdraw[2]);
TextDrawShowForPlayer(playerid,SkinTextdraw[3]);
TextDrawShowForPlayer(playerid,SkinTextdraw[4]);
TextDrawShowForPlayer(playerid,SkinTextdraw[5]);
//These aren't:
TextDrawShowForPlayer(playerid,SkinTextdraw[6]);
TextDrawShowForPlayer(playerid,SkinTextdraw[7]);
TextDrawShowForPlayer(playerid,SkinTextdraw[8]);
TextDrawShowForPlayer(playerid,SkinTextdraw[9]);
TextDrawShowForPlayer(playerid,SkinTextdraw[10]);
//.. till SkinTextdraw[19]
return 1;
}
If you want to see "the making of" the Skintextdraws you can see it here:
http://pastebin.com/v3cKLh97
Some further information:
When the player connects he has to login, when there is response the ClassTextdraws are shown and when the player clicks on ClassTextdraw[2] his class is CLASS_TRUCKER and after that CallSpawn(playerid) gets called and the SkinTextdraws are, trying to be, shown.
These are the 6 textdraws that are shown:
And there should be:
- 4-5 more textdraws on the 1st row
- 7-8 more textdraws on the 2th row
Is there a limit that i don't know ? Is it a sa:mp-bug that i don't know ?
Re: (clickable) textdraws are not showing ?! -
Michael@Belgium - 28.08.2013
* Michael@Belgium bumped the topic
Re: (clickable) textdraws are not showing ?! -
Dragonsaurus - 28.08.2013
Correct me if I am wrong, but I think that the textdraw limit is 2048. Check first how many texdraws you have created...
Re: (clickable) textdraws are not showing ?! -
Michael@Belgium - 29.08.2013
Quote:
Originally Posted by Dragonsaurus
Correct me if I am wrong, but I think that the textdraw limit is 2048. Check first how many texdraws you have created...
|
I'm sure i didn't create 2048 textdraws when the player connects