Posts: 37
Threads: 3
Joined: Feb 2011
Reputation:
0
I'm not quite sure that i explained this properly but how to make it so only 1 player can take a specific skin?
Not lock it to a name or anything, make it a regular skin but make it usable by only 1 player, such as protectthepresident has.
Posts: 2,593
Threads: 34
Joined: Dec 2007
Try
pawn Код:
new SkinIsUsed[MAX_PLAYERS]={-1, ...};
//connect/disconnect
SkinIsUsed[playerid] = (-1);
public OnPlayerRequestClass(playerid, classid)
{
SkinIsUsed[playerid] = classid;
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
for(new d,g=GetMaxPlayers(); d < g; d++)
{
if((IsPlayerConnected(d)) && (d != playerid) && (SkinIsUsed[d] == SkinIsUsed[playerid])) return SendClientMessage(playerid,0xFFFFFFFF,"SERVER: That skin is used by someone") & 0;
}
return 1;
}
Posts: 37
Threads: 3
Joined: Feb 2011
Reputation:
0
I'll check it out later, busy atm.
Posts: 37
Threads: 3
Joined: Feb 2011
Reputation:
0
Tested it, didnt work for some reason.
Can anybody else offer a hand?