SA-MP Forums Archive
Help with freeze - 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 with freeze (/showthread.php?tid=144867)



Help with freeze - ViruZZzZ_ChiLLL - 29.04.2010

Question:
Okay, so I have this code, and why does it freeze me whenever I type any id number??
Код:
case 0:
{
ShowPlayerDialog(playerid, 11,DIALOG_STYLE_INPUT,"Freeze","Type the player's id below:","Next","Cancel");
}

//--------------------------------------------

if(dialogid == 11)
{
if (response)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(string, sizeof(string), "Type here the reason why, you, will freeze %s", name);
ShowPlayerDialog(playerid, 12, DIALOG_STYLE_INPUT,"Freeze",string,"Freeze","Cancel");
TogglePlayerControllable(Player[playerid],0);
return 1;
}
}
Problem:
To make it not freeze me O.O
________
Buddhism forum


Re: Help with freeze - Naxix - 29.04.2010

Make a new dialog with unfreeze?

Код:
TogglePlayerControllable(player[playerid],1);



Re: Help with freeze - ViruZZzZ_ChiLLL - 29.04.2010

Quote:
Originally Posted by Naxix
Make a new dialog with unfreeze?

Код:
TogglePlayerControllable(player[playerid],1);
I already have unfreeze.
My problem is that it freezes me whenever I type any player id number.
________
Portable Vaporizer


Re: Help with freeze - [MWR]Blood - 29.04.2010

pawn Код:
new player1 = ReturnUser(tmp, playerid);
pawn Код:
new tmp = strtok(params,Index);
So, it will be
pawn Код:
TogglePlayerControllable(player1,0);



Re: Help with freeze - Naxix - 29.04.2010

or:

at top of dialog
Код:
new pid;
Код:
TogglePlayerControlable(pid,0);



Re: Help with freeze - [MWR]Blood - 29.04.2010

Quote:
Originally Posted by Naxix
or:

at top of dialog
Код:
new pid;
Код:
TogglePlayerControlable(pid,0);
OT: Dude, stop to spam the topic...


Re: Help with freeze - Correlli - 29.04.2010

pawn Код:
TogglePlayerControllable(strval(inputtext), 0);



Re: Help with freeze - [03]Garsino - 29.04.2010

Quote:
Originally Posted by Naxix
or:

at top of dialog
Код:
new pid;
Код:
TogglePlayerControlable(pid,0);
Learn to script. Your code makes NO sense.


Re: Help with freeze - Naxix - 29.04.2010

Quote:
Originally Posted by [03
Garsino ]
Quote:
Originally Posted by Naxix
or:

at top of dialog
Код:
new pid;
Код:
TogglePlayerControlable(pid,0);
Learn to script. Your code makes NO sense.
Umm.. Maybe it makes no sence to you, but it works for me?


Re: Help with freeze - Correlli - 29.04.2010

Quote:
Originally Posted by Naxix
Quote:
Originally Posted by [03
Garsino ]
Quote:
Originally Posted by Naxix
or:

at top of dialog
Код:
new pid;
Код:
TogglePlayerControlable(pid,0);
Learn to script. Your code makes NO sense.
Umm.. Maybe it makes no sence to you, but it works for me?
Of course it works, because pid variable holds the value of 0 and you're probably the ID 0.

/facepalm