25.08.2013, 12:24
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:
.. but for some strange reason only 6 of them show on the player screen.
I tested like this also:
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 ?
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);
}
//...
}
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;
}
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 ?