Help Pleaseee URGENT -
HaiderABbas - 22.06.2013
***I have added textdraw in house , then problem is when some one connects to my server he see 1 textdraw icon without getting in house ,
***When someone exits house he still get the mouse icon to click textdraw but when he exit house there is no textdraw so how can i hide it and when someone press ESC it fixes
Re: Help Pleaseee URGENT -
Kindred - 22.06.2013
> Shows code, expects us to help.
> Doesn't know basic pawn.
Dude, seriously? This isn't hard at all.
You must have the textdraw showing up when the player connects, or somewhere near there (on a stock called OnPlayerConnect, etc) in order for it to show up. Remove it if you don't want it.
2) Use this to (hopefully) disable the mouse:
pawn Код:
CancelSelectTextDraw(playerid);
Re: Help Pleaseee URGENT -
HaiderABbas - 22.06.2013
Thanks Alot +REP
But What About , When Player Connects He See 1 icon off my All icons and when he /exit house it fixes
Re: Help Pleaseee URGENT -
HaiderABbas - 22.06.2013
Код:
}
stock HouseTextDraws()
{
ExitSign = TextDrawCreate(150,350," ");
TextDrawLetterSize(ExitSign, 0.000000, 0.000000);
TextDrawTextSize(ExitSign,50.579788, 50.583330);
TextDrawFont(ExitSign, TEXT_DRAW_FONT_MODEL_PREVIEW);
TextDrawSetPreviewModel(ExitSign,1502);
TextDrawSetPreviewRot(ExitSign, 0.0, 0.0,0,1.0);
TextDrawBackgroundColor(ExitSign,40);
TextDrawAlignment(ExitSign, 1);
TextDrawColor(ExitSign, -1);
TextDrawSetShadow(ExitSign, 0);
TextDrawSetOutline(ExitSign, 0);
TextDrawSetSelectable(ExitSign,1);
Код:
}
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(GetPVarInt(playerid,"IsInHouse") == 1)
{
if(clickedid == ExitSign)
{
new file[256];
format(file,sizeof(file),FILEPATH,GetPVarInt(playerid,"LastHouseCP"));
SetPVarInt(playerid, "IsInHouse", 0);
SetPlayerPosEx(playerid, dini_Float(file, "SpawnOutX"), dini_Float(file, "SpawnOutY"), dini_Float(file, "SpawnOutZ"), dini_Int(file, "SpawnInterior"), dini_Int(file, "SpawnWorld"));
SetPlayerFacingAngle(playerid, dini_Float(file, "SpawnOutAngle"));
SetPlayerInterior(playerid, dini_Int(file, "SpawnInterior"));
SetPlayerVirtualWorld(playerid, dini_Int(file, "SpawnWorld"));
TextDrawHideForPlayer(playerid,ExitSign);
TextDrawHideForPlayer(playerid,GunSign);
TextDrawHideForPlayer(playerid,CarSign);
TextDrawHideForPlayer(playerid,WheelSign);
CancelSelectTextDraw(playerid);
return 1;
Код:
}
public OnPlayerConnect(playerid)
{
SetPVarInt(playerid, "LastHouseCP",-1);
SetPVarInt(playerid, "InHouse",-1);
CancelSelectTextDraw(playerid);
TextDrawHideForPlayer(playerid,ExitSign);
TextDrawHideForPlayer(playerid,GunSign);
TextDrawHideForPlayer(playerid,CarSign);
TextDrawHideForPlayer(playerid,WheelSign);
See Codes , I added TextDrawHide in playerconnect it still shows