08.01.2013, 05:18
How to make some skins that can only be used with people that has the [Cali] tag in there name..
I will +REP For the first 5 answers, Thanks
I will +REP For the first 5 answers, Thanks
new playerName[ MAX_PLAYER_NAME ];
GetPlayerName( playerid, playerName, MAX_PLAYER_NAME );
if( strfind( "[Cali]", playerName, true ) != -1 )
{
if( GetPlayerSkin( playerid ) /*skin id here*/ )
{
ForceClassSelection( playerid );
SetPlayerHealth( playerid, 0.00 );
SendClientMessage( playerid, -1, "You can use this skin because you are not in clan 'Cali' !" );
}
}
public OnPlayerRequestSpawn(playerid)
{
if(GetPlayerSkin(playerid) == /*Skin id*/)
{
new pName[24];
GetPlayerName(playerid, pName, 24);
if(strfind("[Cali]", pName, 24) != 0) return 0; //!= -1 if players can have the clan tag after their name like Player[Cali]
}
return 1;
}