Block F4 Key
#1

Hi, I don't find any things here to block the F4 Key for all users.
I hope someone know the Keynumber or things to block this.

Greetz Pio
Reply
#2

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    if(IsPlayerLoggedIn[playerid] == 1) // Your way how you recognzie logged in player
    {
        SpawnPlayer(playerid);
    }
    else
    {
        //Your usual class selecting
    }
    return 1;
}
Reply
#3

ok. I will test it.
Reply
#4

Quote:
Originally Posted by Las Venturas CNR
Посмотреть сообщение
It'd be nice if there was a function somewhat close to

pawn Код:
F4MayBeUsed(false);
F4MayBeUsed(true);
which would go under "OnGameModeInIt".
Yes in some RP servers you can bug abuse and change your skin for free doing this.
Reply
#5

Well, possible idea:

pawn Код:
#define ForceClassSelection O_ForceClassSelection
new bool:cs[MAX_PLAYERS];

public OnPlayerSpawn(playerid)
{
  cs[playerid] = false;
  return 1;
}

public OnPlayerConnect(playerid)
{
  cs[playerid] = true;
  return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
  if(!cs[playerid]) return SpawnPlayer(playerid);
  //other code
  return 1;
}

//undef ForceClassSelection
stock O_ForceClassSelection(playerid)
{
  cs[playerid] = true;
  ForceClassSelection(playerid);
}
Just a possible idea, this only allows them to select a class if you use ForceClassSelection.

I used this on a diferrent project once.
Reply


Forum Jump:


Users browsing this thread: