SA-MP Forums Archive
Switch in OnPlayerClickTextDraw (Id of Textdraw) - 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: Switch in OnPlayerClickTextDraw (Id of Textdraw) (/showthread.php?tid=550905)



Switch in OnPlayerClickTextDraw (Id of Textdraw) - Schneider - 15.12.2014

Hello,

I was wondering, is there a way to get the actual value/ID of a Textdraw?

I have got a lot of clickable textdraws and I want to use a switch-function instead of 'if-statements' to scroll through the 'clickedid's'. But using this

pawn Код:
switch(clickedid)   (or (Text:clickedid) )
{
    case Textdraw16:     (or case Text:Textdraw16: )
    {
       //
    }
    case Textdraw20:
    {
       //
    }
}
Gives me 'must be constant expression; assumed zero' errors.

Anyone knows how to get the actual ID of a textdraw?


Re: Switch in OnPlayerClickTextDraw (Id of Textdraw) - Ryz - 15.12.2014

Meybe

pawn Код:
switch(clickedid)
{
     case Textdraw16:
     {
     }