SA-MP Forums Archive
[HELP] Locking Skins - 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] Locking Skins (/showthread.php?tid=71069)



[HELP] Locking Skins - Savill - 29.03.2009

Hey, I just created a new server and i'm using the GTAF gamemode and the SeifAdmin filterscript. I have added a 'Admin' gang with the staff skin and am wondering how to lock that gang/skin just for logged in admins to be able to choose and use it, any ideas?

-Edit- I posted in wrong section D:, my bad.


Re: Bit'a help. - weedarr - 29.03.2009

This have been asked and answered several times. Do a search for skin locking.

WeeDarr


Re: Bit'a help. - Savill - 29.03.2009

Couldn't find anything related with my script, can anyone help?


Re: [HELP] Locking Skins - basker - 02.04.2009

Look at this code you need Password to use the Skin.

In Top oF script !
Код:
new IsRequestingSpawn[MAX_PLAYERS];
Under OnPlayerRequestClass(playerid, classid)
Код:
IsRequestingSpawn[playerid] = 0;
Under public OnPlayerRequestSpawn(playerid)

Код:
if(GetPlayerSkin(playerid) == 165) // <<=== Change 'SkinID' to the id of the locked skin
	{
  GameTextForPlayer(playerid, "~r~Enter Pass...", 3000, 3);
  IsRequestingSpawn[playerid] = 1;
  return 0;
	}
Under OnPlayerText Add This :

Код:
if(IsRequestingSpawn[playerid] == 1)
{
  if(strcmp(text, "Apple", true)==0) // <<<< Change This Password!!
  {
  SpawnPlayer(playerid);
  IsRequestingSpawn[playerid] = 0;
  return 0;
  }
  else
  {
  GameTextForPlayer(playerid, "~r~Wrong Pass!", 2000, 3);
  return 0;
  }
}
	return 1;
And That sould be It :P