[HELP] bussines enter - 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: [HELP] bussines enter (
/showthread.php?tid=517199)
[HELP] bussines enter -
Luca12 - 03.06.2014
Hello I was trying to make in dialog to enter in bussines and when I enter I falling and somehow I spawned on some farm, but when I make the enter in bussines thru the enter key I mean when I press enter key I enter in bussines fine and exit? Why is it not working in dialog? Thanks
Re: [HELP] bussines enter -
awsomedude - 03.06.2014
Well try showing us your code so we can help you.
Re: [HELP] bussines enter -
Luca12 - 03.06.2014
here is code when I press enter button I then enter in the bussines
pawn Код:
if(newkeys & KEY_SECONDARY_ATTACK)
{
for(new i = 0; i < sizeof(BussinesInfo); i++)
{
if(PlayerToPoint(4,playerid,BussinesInfo[i][benterX],BussinesInfo[i][benterY],BussinesInfo[i][benterZ]))
{
if(BussinesInfo[i][bLock] == 1) return GameTextForPlayer(playerid,"~r~Locked!",2500,1);
SetPlayerInterior(playerid,BussinesInfo[i][bInterior]);
SetPlayerVirtualWorld(playerid,BussinesInfo[i][bVWorld]);
SetPlayerPos_H(playerid,BussinesInfo[i][bexitX],BussinesInfo[i][bexitY],BussinesInfo[i][bexitZ]);
EntID[playerid] = i;
break;
}
}
}
and like this I put in on dialogresponse and it not working
Re: [HELP] bussines enter -
KevinPRINCE - 03.06.2014
The keys you press on dialog doesn't and are not suppose to return OnPlayerKeyStateChange, dialogs are used to get input text or to show notices. So if you want to do this on a certain dialog response do the following
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_YOURDIALOG)
{
if(strfind(inputtext, "i", true) != -1)
{
for(new i = 0; i < sizeof(BussinesInfo); i++)
{
if(PlayerToPoint(4,playerid,BussinesInfo[i][benterX],BussinesInfo[i][benterY],BussinesInfo[i][benterZ]))
{
if(BussinesInfo[i][bLock] == 1) return GameTextForPlayer(playerid,"~r~Locked!",2500,1);
SetPlayerInterior(playerid,BussinesInfo[i][bInterior]);
SetPlayerVirtualWorld(playerid,BussinesInfo[i][bVWorld]);
SetPlayerPos_H(playerid,BussinesInfo[i][bexitX],BussinesInfo[i][bexitY],BussinesInfo[i][bexitZ]);
EntID[playerid] = i;
break;
}
}
return 1;
}
}
return 0;
}
Re: [HELP] bussines enter -
Luca12 - 03.06.2014
know when I press enter in dialog nothing's happening? Thanks
Re: [HELP] bussines enter -
Luca12 - 04.06.2014
anyone? thanks