Limit a skin for 1 player to use only.
#1

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

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

I'll check it out later, busy atm.
Reply
#4

That code will not work.
Reply
#5

Tested it, didnt work for some reason.
Can anybody else offer a hand?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)