SA-MP Forums Archive
Textdrawclick help? - 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: Textdrawclick help? (/showthread.php?tid=596232)



Textdrawclick help? - N0FeaR - 14.12.2015

Nothing happends when i click on the textdraw mabye u can help me?


PHP код:
if(clickedid == teleportLS// If the player clicked on the teleportLS textdraw, teleport him there!
    
{
        
SetPlayerPos(playerid1736.4478,-1789.5996,13.4922);
        
SetPlayerFacingAngle(playerid0.9392);
    }
    else if(
clickedid == teleportSF// Same as above, but for SF
    
{
        
SetPlayerPos(playerid, -1424.6083, -290.962214.1484);
        
SetPlayerFacingAngle(playerid134.9570);
    }
    else if(
clickedid == teleportLV// Same, but for LV
    
{
        
SetPlayerPos(playerid1688.79901447.775310.7675);
        
SetPlayerFacingAngle(playerid267.3902);
    }
                     
// Hide the textdraws after the player has teleport himself.
    
TextDrawHideForPlayer(playeridteleportBox);
    
TextDrawHideForPlayer(playeridteleportLS);
    
TextDrawHideForPlayer(playeridteleportSF);
    
TextDrawHideForPlayer(playeridteleportLV);
    
CancelSelectTextDraw(playerid); // Everything worked out perfectly, now stop the player to be able to select shizzle. 
PHP код:
teleportLS TextDrawCreate(320.000000180.000000"Seven ~n~24");
    
TextDrawAlignment(teleportLS2);
    
TextDrawBackgroundColor(teleportLS255);
    
TextDrawFont(teleportLS2);
    
TextDrawLetterSize(teleportLS0.2600000.799999);
    
TextDrawColor(teleportLS, -1);
    
TextDrawSetOutline(teleportLS0);
    
TextDrawSetProportional(teleportLS1);
    
TextDrawSetShadow(teleportLS1);
    
teleportSF TextDrawCreate(320.000000205.000000"San Fierro~n~Airport");
    
TextDrawAlignment(teleportSF2);
    
TextDrawBackgroundColor(teleportSF255);
    
TextDrawFont(teleportSF2);
    
TextDrawLetterSize(teleportSF0.2600000.799999);
    
TextDrawColor(teleportSF, -1);
    
TextDrawSetOutline(teleportSF0);
    
TextDrawSetProportional(teleportSF1);
    
TextDrawSetShadow(teleportSF1);
    
teleportLV TextDrawCreate(320.000000230.000000"Las Venturas~n~Airport");
    
TextDrawAlignment(teleportLV2);
    
TextDrawBackgroundColor(teleportLV255);
    
TextDrawFont(teleportLV2);
    
TextDrawLetterSize(teleportLV0.2600000.799999);
    
TextDrawColor(teleportLV, -1);
    
TextDrawSetOutline(teleportLV0);
    
TextDrawSetProportional(teleportLV1);
    
TextDrawSetShadow(teleportLV1); 



Re: Textdrawclick help? - Untonyst - 14.12.2015

One (click) & two (click) =)


Re: Textdrawclick help? - jlalt - 14.12.2015

You have missed TextDrawSetSelectable
https://sampwiki.blast.hk/wiki/TextDrawSetSelectable


Re: Textdrawclick help? - N0FeaR - 14.12.2015

I have this under OnGameModeInit

PHP код:
    TextDrawSetSelectable(teleportLStrue);
    
TextDrawSetSelectable(teleportSFtrue);
    
TextDrawSetSelectable(teleportLVtrue);