SelectTextDraw & Create vehicle problem (+REP)
#1

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.
Reply
#2

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

2)Show your textdraw Codes
Reply
#4

Код:
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.
Reply
#5

up !
Reply
#6

Show us your lncludes.
Reply
#7

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>

Reply
#8

up !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)