[Tutorial]How disable skin chooser for RP modes. - 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: [Tutorial]How disable skin chooser for RP modes. (
/showthread.php?tid=109745)
[Tutorial]How disable skin chooser for RP modes. -
Toney - 22.11.2009
Well i decided write tutorial after i fixed same problem in my mode.
First we need fix OnPlayerDeath.
1. Open your GM mode.
2. Now we need forward new public -
forward CheckDeath(playerid);
3. Now we need make public CheckDeath. Copy and paste.
Код:
public CheckDeath(playerid)
{
if(IsPlayerNPC(playerid))//If player is NPC then return it.
{
return 0;
}
TogglePlayerSpectating(playerid, 1);
TogglePlayerSpectating(playerid, 0);
SpawnPlayer(playerid);
return 1;
}
4. Ok. Now we have public, we need start this public when player is death. But we need give time for camera in death. 3.5 second will enough for it. Find
public OnPlayerDeath(playerid, killerid, reason)
5. And paste it in this public
SetTimerEx("CheckDeath", 3500, false, "i", playerid);
Done with it. Now if player is death, it show camera death (3.5 seconds) and respawn player wihout skin chooser.
Now we need make it when player in login on.
1. Find
public OnPlayerConnect(playerid)
2. Paste it in this public
TogglePlayerSpectating(playerid, 1);
3. Now find
public OnPlayerLogin(playerid,password[])
4. Paste it in this public
TogglePlayerSpectating(playerid, 0);
Done. Now when player is connected it won't show skin chooser.
Added: If you want disable skin chooser after player pressed on F4:
1. Find
public OnPlayerRequestClass(playerid, classid)
2. Remove all content in this public and just give
return 1;
Done. Now if player pressed on F4 it show Skin chooser but player can't choose any skin.
I hope it has helped you. Good Luck.
Re: [Tutorial]How disable skin chooser for RP modes. -
FUNExtreme - 22.11.2009
OnPlayerLogin shouldn't be used in the tutorial as it is a custom public from your gm
Re: [Tutorial]How disable skin chooser for RP modes. -
Toney - 22.11.2009
Well yes, but it need if you use RP modes like GF, because if you enter wrong password in dialog style, then it loading default spawn change menu.
Re: [Tutorial]How disable skin chooser for RP modes. -
Niixie - 25.02.2010
When i do that, i want him to toggle spectating 0. so he can walk around again? does it do that with spawnplayer normaly?