[HELP] I wanna make it better - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] I wanna make it better (
/showthread.php?tid=189454)
[HELP] I wanna make it better -
marinov - 11.11.2010
Hello, I have this:
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == JOINSTARS)
{
if(!strcmp(inputtext, "password", true))
{
team[playerid] = 6;
ShowPlayerDialog(playerid, JOINSTARS, DIALOG_STYLE_INPUT, "Please enter the password to join S.T.A.R.S.", "Password:", "Submit", "Cancel");
SendClientMessage(playerid,GREEN,"You may now spawn.");
SetPlayerColor(playerid,GREEN);
SetPlayerTeam(playerid, 1);
SetPlayerPos(playerid,1624.2527,1821.0498,10.8203) ;
SetPlayerFacingAngle(playerid,5.6779);
GivePlayerWeapon(playerid,31,300);
GivePlayerWeapon(playerid,24,300);
GivePlayerMoney(playerid, 20000);
SetPlayerInterior(playerid,0);
SetPlayerArmour(playerid, 100);
}
but after the player enter the password, the box won't go away until he types something else and click submit. How do I make it go away by itself after he enters the password and click submit ?
Re: [HELP] I wanna make it better -
iggy1 - 11.11.2010
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == JOINSTARS)
{
if(response)
{
if(!strcmp(inputtext, "password", true))
{
team[playerid] = 6;
SendClientMessage(playerid,GREEN,"You may now spawn.");
SetPlayerColor(playerid,GREEN);
SetPlayerTeam(playerid, 1);
SetPlayerPos(playerid,1624.2527,1821.0498,10.8203) ;
SetPlayerFacingAngle(playerid,5.6779);
GivePlayerWeapon(playerid,31,300);
GivePlayerWeapon(playerid,24,300);
GivePlayerMoney(playerid, 20000);
SetPlayerInterior(playerid,0);
SetPlayerArmour(playerid, 100);
}
}
else SendClientMessage(playerid, 0xff0000FF,"Cancelled");
}
return 1;
}
You was showing the dialog inside the dialog
Re: [HELP] I wanna make it better -
marinov - 11.11.2010
It is a lot better, it is not going away by itself but it does when clicking cancel
thx man
Re: [HELP] I wanna make it better -
iggy1 - 11.11.2010
Try returning 1 after "SetPlayerArmour(playerid, 100);" might not make a difference but worth a try.
Re: [HELP] I wanna make it better -
marinov - 11.11.2010
Will try
Re: [HELP] I wanna make it better -
marinov - 11.11.2010
It does the same thing xD