Onplayerrequestspawn bugged again
#1

hey I have a problem in onplayerrequestspawn okey, when player try to choose admin skin or any skin that is listed and he is not an admin he will got an error message you are not an admin you can't use this skin but why when he press shift or spawn it don't send one message its sends 4 its a weird bug I gone to all server and on a 1 press it just sends 1 message and in mine for 1 press 4 messages :/
Reply
#2

bump *
Reply
#3

pawn Код:
return 1;
Add that after error message code?
Reply
#4

as AphexCCFC said,check if you have
pawn Код:
return 1;
because it's a message
Reply
#5

sorry for multi posts its already there dude it send the player a message but it sends lots of messages for one spawn I need it to send just 1 message for every pressing shift or spawn button -_-
Reply
#6

Post OnPlayerRequestSpawn callback.
Reply
#7

I will post them all here its is
pawn Код:
//==========================Allowed Skins=======================================
public OnPlayerRequestSpawn(playerid){
//------------------------Admin Only Skin------------------------------------------
    if(ServerInfo[AdminOnlySkins] == 1) {
        if(GetPlayerSkin(playerid) == ServerInfo[AdminSkin]) {
             if(PlayerInfo[playerid][Level] >= 1)
                SetPlayerHealth(playerid, 100);
                else {
                if(PlayerInfo[playerid][Level] >= 0)
                SendClientMessage(playerid, red, "You are not an admin to use admin skin");
                return 0;}}}
    return 1;}
but there is another for my clan if you want them I will show them later
Reply
#8

Didn't I send you the solution about a week ago? You clearly don't use what I told you and if the level is 0, it will keep sending the message.
Reply
#9

dude noop when player tries to choose the skin its sends no message if he weren't an admin ... or can you put the code on the mine ?
Reply
#10

Setting the health in class selections makes no sense:
pawn Код:
// global:
new bool: Player_AdminSkinWarning[MAX_PLAYERS char];

// OnPlayerConnect:
Player_AdminSkinWarning{playerid} = false;

public OnPlayerRequestSpawn(playerid)
{
    //------------------------Admin Only Skin------------------------------------------
    if (ServerInfo[AdminOnlySkins] && GetPlayerSkin(playerid) == ServerInfo[AdminSkin])
    {
        if (!PlayerInfo[playerid][Level])
        {
            if (!Player_AdminSkinWarning{playerid})
            {
                Player_AdminSkinWarning{playerid} = true;
                SendClientMessage(playerid, red, "You are not an admin to use admin skin");
            }
            return 0;
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)