Preventing Players from using Admin skin without killing them.
#1

Instead of preventing players from using admin skin by killing them I would like to just make them stay in class selection and just send a message.

This is my admin skin protection:

pawn Код:
if(ServerInfo[AdminOnlySkins] == 1) {
        if( (GetPlayerSkin(playerid) == ServerInfo[AdminSkin]) || (GetPlayerSkin(playerid) == ServerInfo[AdminSkin2]) ) {
            if(PlayerInfo[playerid][Level] >= 1)
                GameTextForPlayer(playerid,"~b~Welcome~n~~w~Admin",3000,1);
            else {
                GameTextForPlayer(playerid,"~r~This Skin Is For~n~Administrators~n~Only",4000,1);
                SetTimerEx("DelayKillPlayer", 2500,0,"d",playerid);
                return 1;
            }
        }
    }
Reply
#2

Код:
public OnPlayerRequestSpawn(playerid)
{
if(ServerInfo[AdminOnlySkins] == 1) {
        if( (GetPlayerSkin(playerid) == ServerInfo[AdminSkin]) || (GetPlayerSkin(playerid) == ServerInfo[AdminSkin2]) ) {
            if(PlayerInfo[playerid][Level] >= 1)
                GameTextForPlayer(playerid,"~b~Welcome~n~~w~Admin",3000,1);
            else {
                GameTextForPlayer(playerid,"~r~This Skin Is For~n~Administrators~n~Only",4000,1);
                return 0;
                
            }
        }
    }

return 1;
}
Didn't test the code, just showing an example.
Reply
#3

Quote:
Originally Posted by jikesh_jus
Посмотреть сообщение
Код:
public OnPlayerRequestSpawn(playerid)
{
if(ServerInfo[AdminOnlySkins] == 1) {
        if( (GetPlayerSkin(playerid) == ServerInfo[AdminSkin]) || (GetPlayerSkin(playerid) == ServerInfo[AdminSkin2]) ) {
            if(PlayerInfo[playerid][Level] >= 1)
                GameTextForPlayer(playerid,"~b~Welcome~n~~w~Admin",3000,1);
            else {
                GameTextForPlayer(playerid,"~r~This Skin Is For~n~Administrators~n~Only",4000,1);
                return 0;
                
            }
        }
    }

return 1;
}
Didn't test the code, just showing an example.
Didn't help at all :/
Reply
#4

Код:
public OnPlayerRequestSpawn(playerid)
{
	if(GetPlayerSkin(playerid) == 278 && PlayerInfo[playerid][Level] < 1)
	{
	    SendClientMessage(playerid,COLOR_ERROR,"This is an admin only skin");
		return 0;
	}
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)