Password Protected 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: Password Protected Skins? (
/showthread.php?tid=181070)
Password Protected Skins? -
Luis- - 03.10.2010
How can I make skins invite only like this;
pawn Код:
dcmd_sinvite(playerid, params[])
{
// Stuff Here
return 1;
}
Thank you..
Re: Password Protected Skins? -
CrucixTM - 03.10.2010
So that when a player is invited by a person, he can use that skin?
Well, I'm not gonna script it but I can give you some hints towards it.
Make an array for each player that defines if they can use the skin or not. Change that array on that /sinvite command. Then OnPlayerRequestSpawn;
"if(GetPlayerSkin(playerid) == *your skin that should be restricted here* && *array to control if he can use it here* == 0) return SendClientMessage(playerid, COLOR_RED, "You can't use this skin.");
Correct me if I'm wrong, but I think that would work. Is this what you wanted?
Re: Password Protected Skins? -
Luis- - 03.10.2010
I could do with a template..
Re: Password Protected Skins? -
Retardedwolf - 03.10.2010
https://sampwiki.blast.hk/wiki/OnPlayerRequestClass
Theres kinda a template on the wiki for you so I think it would be good for you as what your signature tells me.
Re: Password Protected Skins? -
CrucixTM - 03.10.2010
Quote:
Originally Posted by Retardedwolf
|
Not RequestClass, RequestSpawn. RequestSpawn is when you click the "Spawn" button in class selection, and that's where he should make this code.
Re: Password Protected Skins? -
Luis- - 03.10.2010
I need help fast?
Re: Password Protected Skins? -
Retardedwolf - 04.10.2010
Quote:
Originally Posted by CrucixTM
Not RequestClass, RequestSpawn. RequestSpawn is when you click the "Spawn" button in class selection, and that's where he should make this code.
|
That functions doesn't have classid you smart ass.
You return 0 in OPRC to disallow them to spawn.
Re: Password Protected Skins? -
Toni - 04.10.2010
Quote:
Originally Posted by Retardedwolf
That functions doesn't have classid you smart ass.
You return 0 in OPRC to disallow them to spawn.
|
Exactly.
You could easily do this with a var.
I.e:
pawn Код:
//Global var.
new SkinPass[MAX_PLAYERS] = 0;
new SkinProtected = {
{skin ids}
};
public OPRC(playerid, classid)
{
if(SkinPass[playerid] == 0 && classid == SkinProtected)
{
return 0;
}
else
{
return 1;
}
return 0;
}
Re: Password Protected Skins? -
CrucixTM - 04.10.2010
Quote:
Originally Posted by Retardedwolf
That functions doesn't have classid you smart ass.
You return 0 in OPRC to disallow them to spawn.
|
You can use other options than classid, "smartass" yourself.
I did that in my server, so it's doable. Don't tell me it's not.
Re: Password Protected Skins? -
Retardedwolf - 04.10.2010
Quote:
Originally Posted by CrucixTM
You can use other options than classid, "smartass" yourself. I did that in my server, so it's doable. Don't tell me it's not.
|
But still I recommend him to use OPRC