29.05.2012, 21:45
Hi, I use this code and that for clicking textdraws but it's giving off false data:
[ame]http://www.youtube.com/watch?v=cR7YYvdxLQg[/ame]
All of the other numbers work apart from option 5, water. When I click water it calls donut but all the others are fine.
Код:
for(new k = 0; k < MAX_ROWS; k++) { Position = rc + (k * 9); bxOptions[playerid][k] = CreatePlayerTextDraw(playerid, 14.000000, Position, " "); PlayerTextDrawBackgroundColor(playerid, bxOptions[playerid][k], 255); PlayerTextDrawFont(playerid, bxOptions[playerid][k], 1); PlayerTextDrawLetterSize(playerid, bxOptions[playerid][k], 0.23, 0.93); PlayerTextDrawColor(playerid, bxOptions[playerid][k], -1); PlayerTextDrawSetOutline(playerid, bxOptions[playerid][k], 1); PlayerTextDrawSetProportional(playerid, bxOptions[playerid][k], 1); PlayerTextDrawSetSelectable(playerid, bxOptions[playerid][k], 1); } public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid) { if(playertextid != INVALID_TEXT_DRAW_PLAYER) { for(new k = 0; k < MAX_ROWS; k++) { if(playertextid == bxOptions[playerid][k]) { if(k-1 <= 0) continue; format(msg, 5, "%d", k-1); CallRemoteFunction("OnPlayerText", "is", playerid, msg); break; } } } return 1; }
All of the other numbers work apart from option 5, water. When I click water it calls donut but all the others are fine.