Textdraw Arrow question
#1

Hi. I have a textdraw where you can click an arrow to go to a different town. (it's a spawn selection)

How do I do it so the town changes each time you click the arrow? My head is in the stars ATM.

Thanks.
Reply
#2

um, I don't quite understand what you mean, could you explain abit more please?
Reply
#3

Does this help?




Does that help?? So if i keep clicking the right arrow it'll go to a different town each time.
Reply
#4

help
Reply
#5

Use:
pawn Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
to make something happen. Use an if statement for if the clickedid is equal to whatever textdraw and if it is than to do something.
Reply
#6

first make a arrow as a textdraw
second make it selectable
third use SelectTextDraw when it shows
forth in callback OnPlayerClickTextDraw set what you want


SrY FoR My BaD EnGlIsH
Reply
#7

Yes I know that. Though I am puzzled as to how I would make it like pages.
Reply
#8

Quote:
Originally Posted by sammp
Посмотреть сообщение
Yes I know that. Though I am puzzled as to how I would make it like pages.
Just use a variable. Like:
pawn Код:
new SpawnSelected[MAX_PLAYERS];
And have it assign a specific value each time you click the arrow. So if they click the right arrow:
pawn Код:
SpawnSelected[playerid]++;
and for the left arrow:
pawn Код:
SpawnSelected[playerid]--;
And then create a function to spawn the player based on a key or command and use:
pawn Код:
switch(SpawnSelected[playerid])
{
    case 0: //Your first selection
    case 1: //Your second selection
    case 2: //Your third selection
}
Be sure you make it to where if SpawnSelected[playerid] is equal to three (or your max value) then if the right arrow is clicked (to make the variable increase) then subtract it by the amount of possible spawns, three for my example.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)