SA-MP Forums Archive
SelectTextDraw & Create vehicle problem (+REP) - 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: SelectTextDraw & Create vehicle problem (+REP) (/showthread.php?tid=602372)



SelectTextDraw & Create vehicle problem (+REP) - Poschi - 06.03.2016

I have 2 problems:


1) When i try to spawn cars with function CreateVehicle on my gamemode, the vehicle appear after 6 seconds. (too late). When i'm using another gamemode, the vehicle appear after 2 seconds. Somebody know why?

2) Function "SelectPlayerTextDraw" work first time but after i call function "CancelTextDraw" and i use again "SelectPlayerTextDraw" the mouse cursor didn't appered. Why? The TextDraws is selectable.

Sorry for my bad english.


Re: SelectTextDraw & Create vehicle problem (+REP) - K0P - 06.03.2016

1) You need to optimize your gamemode so it will reduce the lag and the cars will spawn faster


Re: SelectTextDraw & Create vehicle problem (+REP) - SyS - 06.03.2016

2)Show your textdraw Codes


Re: SelectTextDraw & Create vehicle problem (+REP) - Poschi - 06.03.2016

Код:
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
	new string[128];
if(playertextid == DSInfo)
    {
		CancelSelectTextDraw(playerid);
        new title[128], content[512];
		format(content, sizeof(content), ds_info_en,VehicleNames[DSModels[DealerID[playerid]][dModel]-400],DSModels[DealerID[playerid]][dModel],FormatNumber(DSModels[DealerID[playerid]][dPrice]),DSModels[DealerID[playerid]][dStock],
		DSModels[DealerID[playerid]][dDoors],DSModels[DealerID[playerid]][dType],DSModels[DealerID[playerid]][dMaxSpeed]);
		format(title, sizeof(title), infoabout_text_en, VehicleNames[DSModels[DealerID[playerid]][dModel]-400]);
		ShowPlayerDialog(playerid, DIALOG_DSINFO, DIALOG_STYLE_MSGBOX, title, content, close_text_en, "");
		//
    }

return 1;
}
Dialog:
Код:
	if(dialogid == DIALOG_DSINFO)
	{
		if(response)
  		{
  			SelectTextDraw(playerid, 0xFF0000FF);
  		}
  		else
  		{
			SelectTextDraw(playerid, 0xFF0000FF);
  		}
	}
TextDraw:
Код:
	DSInfo = CreatePlayerTextDraw(playerid, 524.428344, 370.906524, "More info");
	PlayerTextDrawLetterSize(playerid, DSInfo, 0.323523, 0.911306);
	PlayerTextDrawTextSize(playerid, DSInfo, 579.808349, 37.546718);
	PlayerTextDrawAlignment(playerid, DSInfo, 1);
	PlayerTextDrawColor(playerid, DSInfo, -1);
	PlayerTextDrawSetShadow(playerid, DSInfo, 0);
	PlayerTextDrawSetOutline(playerid, DSInfo, 1);
	PlayerTextDrawBackgroundColor(playerid, DSInfo, 51);
	PlayerTextDrawFont(playerid, DSInfo, 1);
	PlayerTextDrawSetProportional(playerid, DSInfo, 1);
	PlayerTextDrawSetSelectable(playerid, DSInfo, 1);
Bug:
Mouse curos appeared first time, but if i select "More Information" then close dialog, mouse cursor disappeared (text draw is not selectable).

Problem #1 was sloved. Thanks.


Re: SelectTextDraw & Create vehicle problem (+REP) - Poschi - 06.03.2016

up !


Re: SelectTextDraw & Create vehicle problem (+REP) - AdmBot - 06.03.2016

Show us your lncludes.


Re: SelectTextDraw & Create vehicle problem (+REP) - Poschi - 07.03.2016

Uite:
Quote:

#include <a_samp>
#include <BustAim>
#include <a_mysql>
#include <accounts>
#include <crashdetect>
#include <other>
#include <streamer>
#include <Whirlpool>
//#define PP_WP // Use whirlpool, recommended
//#include <fixPNS>
#include <sscanf2>
#include <zcmd>
#include <lang>
#include <fly>
#include <foreach>
#include <missions> // KanDel's project
#include <anticheat> // KanDel's project
#include <vehicles> // KanDel's project
#include <functions> // KanDel's project
#include <systems> // autoafk
#include <alt_dialogs> // autoafk
#include <evf>
#include <progress2>




Re: SelectTextDraw & Create vehicle problem (+REP) - Poschi - 07.03.2016

up !