SA-MP Forums Archive
Keypad Door Problem With Message - 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: Keypad Door Problem With Message (/showthread.php?tid=357163)



Keypad Door Problem With Message - zT KiNgKoNg - 06.07.2012

Quote:

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (newkeys & KEY_SECONDARY_ATTACK)
{
if(gTeam[playerid] == Police)
if(IsPlayerInRangeOfPoint(playerid, 1.0,2481.3732, -1671.9863, 13.8873))
{
if (isopen1 == 0)
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "What Would You Like To Do", "Open\nClose\nInfo", "Select", "Close");
MoveObject(test,2494.1902, -1670.2520, 11.6533,0.90);
ApplyAnimation(playerid, "HEIST9", "Use_SwipeCard", 4.0, 0, 0, 0, 0, 0);
GameTextForPlayer(playerid, "~b~Cell 1 ~g~Opening",1500,4);
isopen1 = 1;
return 1;
}
else if(gTeam[playerid] == Mafia)
{
SendClientMessage(playerid,COLOR_BLUE,"Sorry Your Not On The Police Team ");
}
if (isopen1 == 1)
{
MoveObject(test, 2485.69, -1670.25, 11.65,0.90);
ApplyAnimation(playerid, "HEIST9", "Use_SwipeCard", 4.0, 0, 0, 0, 0, 0);
GameTextForPlayer(playerid, "~b~Cell 1 ~r~ Closing",1500,4);
isopen1 = 0;
return 1;
}
}
}
return 1;
}

But its not returning the message


Re: Keypad Door Problem With Message - jaami - 06.07.2012

Why is there
Quote:

ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "What Would You Like To Do", "Open\nClose\nInfo", "Select", "Close");

Try to remove it and see


Re: Keypad Door Problem With Message - zT KiNgKoNg - 06.07.2012

Quote:
Originally Posted by jaami
Посмотреть сообщение
Why is there

Try to remove it and see
Nothing ??
Can Anyone Help


Re: Keypad Door Problem With Message - clarencecuzz - 06.07.2012

EDIT: Remove the ShowPlayerDialog if you like, depending on whether you want it there or not.

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (newkeys & KEY_SECONDARY_ATTACK)
{
if(gTeam[playerid] == Police)
{
if(IsPlayerInRangeOfPoint(playerid, 1.0,2481.3732, -1671.9863, 13.8873))
{
if (isopen1 == 0)
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "What Would You Like To Do", "Open\nClose\nInfo", "Select", "Close");
MoveObject(test,2494.1902, -1670.2520, 11.6533,0.90);
ApplyAnimation(playerid, "HEIST9", "Use_SwipeCard", 4.0, 0, 0, 0, 0, 0);
GameTextForPlayer(playerid, "~b~Cell 1 ~g~Opening",1500,4);
isopen1 = 1;
return 1;
}
else if (isopen1 == 1)
{
MoveObject(test, 2485.69, -1670.25, 11.65,0.90);
ApplyAnimation(playerid, "HEIST9", "Use_SwipeCard", 4.0, 0, 0, 0, 0, 0);
GameTextForPlayer(playerid, "~b~Cell 1 ~r~ Closing",1500,4);
isopen1 = 0;
return 1;
} } }
else if(gTeam[playerid] == Mafia) return
SendClientMessage(playerid,COLOR_BLUE,"Sorry You're Not On The Police Team ");
}
return 1;
}



Re: Keypad Door Problem With Message - clarencecuzz - 06.07.2012

Sorry, I just fixed my last post. Didn't read through it properly.


Re: Keypad Door Problem With Message - Zach7 - 06.07.2012

sry wrong place didnt mean to