Password Protected Skins?
#1

How can I make skins invite only like this;

pawn Код:
dcmd_sinvite(playerid, params[])
{
// Stuff Here
return 1;
}
Thank you..
Reply
#2

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?
Reply
#3

I could do with a template..
Reply
#4

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.
Reply
#5

Quote:
Originally Posted by Retardedwolf
Посмотреть сообщение
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.
Not RequestClass, RequestSpawn. RequestSpawn is when you click the "Spawn" button in class selection, and that's where he should make this code.
Reply
#6

I need help fast?
Reply
#7

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.
Reply
#8

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;
}
Reply
#9

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.
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)