SA-MP Forums Archive
Lock Skin - 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)
+--- Thread: Lock Skin (/showthread.php?tid=103370)



Lock Skin - tiwk - 19.10.2009

How can I block skins?

For only the members of a clan can choose and see.


EX
The people enter the server with tag Ex.[LO]TIWK can choose and see.

The peplo enter the server out tag no chouse and no see.

HElp

Tanks...and sorry my inglish


Re: Lock Skin - MaykoX - 19.10.2009

Yeah i wana do it to i know its somthing with teams..


Re: Lock Skin - tiwk - 19.10.2009

Quote:
Originally Posted by caremayko11
Yeah i wana do it to i know its somthing with teams..
Please people help my


Re: Lock Skin - Virtual1ty - 19.10.2009

i had this before on my server.. you will have to make a #define for example #define TEAM_TRIAD 294 //this number is the skin ID
under OnPlayerSpawn:
pawn Код:
if((GetPlayerSkin(playerid) == TEAM_TRIAD))
    {
        GetPlayerName(playerid, name, sizeof(name));
        if(strcmp(name,"Death_Angel",true) == 0) // change this to the name you want
        {
        }
        else
        {
            GameTextForPlayer(playerid,"~r~This Skin Is For~n~TRIAD'S~n~Only !",700,1); // change this too...
            ForceClassSelection(playerid);
            SetPlayerHealth(playerid,0.0);
        }
        return 1;
    }



Re: Lock Skin - tiwk - 19.10.2009

Quote:
Originally Posted by Virtual1ty
i had this before on my server.. you will have to make a #define for example #define TEAM_TRIAD 294 //this number is the skin ID
under OnPlayerSpawn:
pawn Код:
if((GetPlayerSkin(playerid) == TEAM_TRIAD))
    {
        GetPlayerName(playerid, name, sizeof(name));
        if(strcmp(name,"Death_Angel",true) == 0) // change this to the name you want
        {
        }
        else
        {
            GameTextForPlayer(playerid,"~r~This Skin Is For~n~TRIAD'S~n~Only !",700,1); // change this too...
            ForceClassSelection(playerid);
            SetPlayerHealth(playerid,0.0);
        }
        return 1;
    }
Ty one problem

1091) : error 017: undefined symbol "name"
1091) : error 017: undefined symbol "name"
1091) : error 029: invalid expression, assumed zero
1091) : fatal error 107: too many error messages on one line


Re: Lock Skin - kman - 19.10.2009

i wanna know same thing but only that you need a high score to choose that skin?


Re: Lock Skin - Virtual1ty - 20.10.2009

Quote:
Originally Posted by tiwk
Quote:
Originally Posted by Virtual1ty
i had this before on my server.. you will have to make a #define for example #define TEAM_TRIAD 294 //this number is the skin ID
under OnPlayerSpawn:
pawn Код:
if((GetPlayerSkin(playerid) == TEAM_TRIAD))
    {
        GetPlayerName(playerid, name, sizeof(name));
        if(strcmp(name,"Death_Angel",true) == 0) // change this to the name you want
        {
        }
        else
        {
            GameTextForPlayer(playerid,"~r~This Skin Is For~n~TRIAD'S~n~Only !",700,1); // change this too...
            ForceClassSelection(playerid);
            SetPlayerHealth(playerid,0.0);
        }
        return 1;
    }
Ty one problem

1091) : error 017: undefined symbol "name"
1091) : error 017: undefined symbol "name"
1091) : error 029: invalid expression, assumed zero
1091) : fatal error 107: too many error messages on one line
very, very strange .. try adding
pawn Код:
new name[MAX_PLAYER_NAME];
somewhere under OnPlayerSpawn


Re: Lock Skin - Lynet - 21.11.2012

public OnPlayerRequestSpawn(playerid)
{
new skin = GetPlayerSkin(playerid);
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
if((skin == 240) && (strcmp(name, "NAME FOR DUDE", true) == 1))
{
SendClientMessage(playerid,COLOR_RED,"This Skin Is Locked For Fool........");
SetPlayerHealth(playerid,0);
return 0;
}

Try this anyways