Force class selection after OnPlayerRequestClass return 0
#4

Quote:
Originally Posted by 5194Hercules
Посмотреть сообщение
Change the skin id (163)to your admin skin so admins can only choose that skin .
No, this code is to forbid player to spawn when trying to spawn with this skin and hasn't logged in yet!

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    if(GetPlayerSkin(playerid) == 0 && (PlayerInfo[playerid][LoggedIn] == 0))
    {
        SendClientMessage(playerid, COLOR_RED, "*YOUR ERROR MESSAGE*");
        return 0;
    }
    return 1;
}
    if(GetPlayerSkin(playerid) == 1 && (PlayerInfo[playerid][LoggedIn] == 0))
    {
        SendClientMessage(playerid, COLOR_RED, "*YOUR ERROR MESSAGE*");
        return 0;
    }
    return 1;
}
    if(GetPlayerSkin(playerid) == 2 && (PlayerInfo[playerid][LoggedIn] == 0))
    {
        SendClientMessage(playerid, COLOR_RED, "*YOUR ERROR MESSAGE*");
        return 0;
    }
    return 1;
}
Here is what it need to look like.. you have to do it with all your skins.. just replace "if(GetPlayerSkin(playerid) == [YOURSKINID]" and do it with every skin!
Reply


Messages In This Thread
Force class selection after OnPlayerRequestClass return 0 - by Morion - 03.09.2014, 05:27
Re: Force class selection after OnPlayerRequestClass return 0 - by LeroyII - 03.09.2014, 07:12
Re: Force class selection after OnPlayerRequestClass return 0 - by 5194Hercules - 03.09.2014, 07:35
Re: Force class selection after OnPlayerRequestClass return 0 - by LeroyII - 03.09.2014, 07:53
Re: Force class selection after OnPlayerRequestClass return 0 - by Morion - 03.09.2014, 10:09

Forum Jump:


Users browsing this thread: 1 Guest(s)