Disable Commands OnPlayerRequestClass?
#1

Problem Solved
Reply
#2

use a variable:
pawn Код:
new bool:InSpawn[MAX_PLAYERS];

public OnPlayerRequestClass(playerid, classid)
{
  InSpawn[playerid] = true;
  return 1;
}

public OnPlayerSpawn(playerid)
{
  InSpawn[playerid] = false;
  return 1;
}
and on your commands just add this to the top:
pawn Код:
if(InSpawn[playerid] == true) return SendClientMessage(playerid, 0x999999AA, "You can't use this command while being on class selection.");
Reply
#3

Quote:
Originally Posted by Sascha
Посмотреть сообщение
use a variable:
pawn Код:
new bool:InSpawn[MAX_PLAYERS];

public OnPlayerRequestClass(playerid, classid)
{
  InSpawn[playerid] = true;
  return 1;
}

public OnPlayerSpawn(playerid)
{
  InSpawn[playerid] = false;
  return 1;
}
and on your commands just add this to the top:
pawn Код:
if(InSpawn[playerid] == true) return SendClientMessage(playerid, 0x999999AA, "You can't use this command while being on class selection.");
Thanks It Work!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)