Problem with TogglePlayerControllable - 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: Problem with TogglePlayerControllable (
/showthread.php?tid=275485)
Problem with TogglePlayerControllable -
misticini - 09.08.2011
Hello,
I have a problem with function TogglePlayerControllable.
I have de follow code:
Код:
public SetPlayerSpawn(playerid)
{
.....
if(PlayerInfo[playerid][pTut] == 0)
{
gOoc[playerid] = 1; gNews[playerid] = 1; gFam[playerid] = 1;
SafeSetPlayerInterior(playerid, 3);
SafeSetPlayerPos(playerid, 330.6825,163.6688,1014.1875);
SetPlayerFacingAngle(playerid, 280);
TogglePlayerControllable(playerid, 0);
RegistrationStep[playerid] = 1;
SendClientMessage(playerid, COLOR_LIGHTRED, "Hello there! Welcome to the Los Santo Immigration Center, I will be asking you a few questions.");
SendClientMessage(playerid, COLOR_LIGHTRED, "First Question: Are you a Male or Female?");
SendClientMessage(playerid, COLOR_LIGHTRED, "TIP: Please type in what you are! Don't worry, no one will see it!");
PlayerInfo[playerid][pRegularCount] = 144000;
SafeGivePlayerMoney(playerid,500);
return 1;
}
.....
}
But player not be freeze, he can moves.
Why toggle donґt work?
Regards
Re: Problem with TogglePlayerControllable -
Cypress - 09.08.2011
pawn Код:
public SetPlayerSpawn(playerid)
{
.....
if(PlayerInfo[playerid][pTut] == 0)
{
gOoc[playerid] = 1; gNews[playerid] = 1; gFam[playerid] = 1;
SafeSetPlayerInterior(playerid, 3);
SafeSetPlayerPos(playerid, 330.6825,163.6688,1014.1875);
SetPlayerFacingAngle(playerid, 280);
TogglePlayerControllable(playerid, 1); // Set that thing to 1 to freeze the player.
RegistrationStep[playerid] = 1;
SendClientMessage(playerid, COLOR_LIGHTRED, "Hello there! Welcome to the Los Santo Immigration Center, I will be asking you a few questions.");
SendClientMessage(playerid, COLOR_LIGHTRED, "First Question: Are you a Male or Female?");
SendClientMessage(playerid, COLOR_LIGHTRED, "TIP: Please type in what you are! Don't worry, no one will see it!");
PlayerInfo[playerid][pRegularCount] = 144000;
SafeGivePlayerMoney(playerid,500);
return 1;
}
}
Re: Problem with TogglePlayerControllable -
misticini - 09.08.2011
hello,
but the wiki dont say that:
https://sampwiki.blast.hk/wroot/index.ph...le&redirect=no
Re : Re: Problem with TogglePlayerControllable -
Soumi - 09.08.2011
Quote:
Originally Posted by Cypress
pawn Код:
public SetPlayerSpawn(playerid) { ..... if(PlayerInfo[playerid][pTut] == 0) { gOoc[playerid] = 1; gNews[playerid] = 1; gFam[playerid] = 1; SafeSetPlayerInterior(playerid, 3); SafeSetPlayerPos(playerid, 330.6825,163.6688,1014.1875); SetPlayerFacingAngle(playerid, 280); TogglePlayerControllable(playerid, 1); // Set that thing to 1 to freeze the player. RegistrationStep[playerid] = 1; SendClientMessage(playerid, COLOR_LIGHTRED, "Hello there! Welcome to the Los Santo Immigration Center, I will be asking you a few questions."); SendClientMessage(playerid, COLOR_LIGHTRED, "First Question: Are you a Male or Female?"); SendClientMessage(playerid, COLOR_LIGHTRED, "TIP: Please type in what you are! Don't worry, no one will see it!"); PlayerInfo[playerid][pRegularCount] = 144000; SafeGivePlayerMoney(playerid,500); return 1; } }
|
Your wrong. 0 to freeze the player or 1 to unfreeze them.
Edit: Too late
Re: Problem with TogglePlayerControllable -
misticini - 09.08.2011
yeah, but the player not freeze..
Why? anyone knows? this not work.
Regards
Re: Problem with TogglePlayerControllable -
mprofitt - 10.08.2011
Have a look at this thread.
https://sampforum.blast.hk/showthread.php?tid=184118
If you find it useful, pass some respect my way.