How can I make people in class selection muted and unmuted when spawning? -
OleKristian95 - 04.04.2012
If anyone knows how please tell me..
I am using Lethal Admin script if it matters.
Re: How can I make people in class selection muted and unmuted when spawning? -
TzAkS. - 04.04.2012
I don`t know what do you mean.
Do you mean like this?
OnPlayerRequestClass or where u wan`t it
PlayerInfo[playerid[pMute] == 1;
On spawn
PlayerInfo[playerid[pMute] == 0;
Re: How can I make people in class selection muted and unmuted when spawning? -
OleKristian95 - 04.04.2012
Quote:
Originally Posted by TzAkS.
I don`t know what do you mean.
Do you mean like this?
OnPlayerRequestClass or where u wan`t it
PlayerInfo[playerid[pMute] == 1;
On spawn
PlayerInfo[playerid[pMute] == 0;
|
Will this keep the players muted while choosing skin, and unmuting them when they have spawned?
Re: How can I make people in class selection muted and unmuted when spawning? -
TzAkS. - 04.04.2012
Yes,but you will have a bug.
If you give to a player /mute he will have pMute == 1 and if he relogs will got pMute == 0.
Make a function exactly like pMute but with other name and use it just here.
Re: How can I make people in class selection muted and unmuted when spawning? -
DR3AD - 05.04.2012
you mean something similiar to this
Код:
new bool:PlayerMuted[MAX_PLAYERS];
public OnPlayerRequestClass(playerid, classid)
{
if(IsPlayerConnected(playerid))
PlayerMuted[playerid] = true;
return 1;
}
public OnPlayerSpawn(playerid)
{
if(IsPlayerConnected(playerid))
PlayerMuted[playerid] = false;
return 1;
}
public OnPlayerText(playerid, text[])
{
if(IsPlayerConnected(playerid))
if(PlayerMuted[playerid] == true)
return SendClientMessage(playerid, -1, "You must spawn before you chat");
return 1;
}
I dont know if it works.. didnt test it
Re: How can I make people in class selection muted and unmuted when spawning? -
$$inSane - 05.04.2012
Put the code of muting in OnPlayerRequestClass and put unmuting code in OnPlayerRequestSpawn.
Simple
Re: How can I make people in class selection muted and unmuted when spawning? -
TzAkS. - 05.04.2012
Quote:
Originally Posted by $$inSane
Put the code of muting in OnPlayerRequestClass and put unmuting code in OnPlayerRequestSpawn.
Simple
|
Yes is very simple,but how i said in second post,if the player logout with Mute == 1 then when he relog`s will have mute == 0 ..so it`s bug.
The solution is to create a new function for mute.
Re: How can I make people in class selection muted and unmuted when spawning? -
OleKristian95 - 05.04.2012
Quote:
Originally Posted by DR3AD
you mean something similiar to this
Код:
new bool:PlayerMuted[MAX_PLAYERS];
public OnPlayerRequestClass(playerid, classid)
{
if(IsPlayerConnected(playerid))
PlayerMuted[playerid] = true;
return 1;
}
public OnPlayerSpawn(playerid)
{
if(IsPlayerConnected(playerid))
PlayerMuted[playerid] = false;
return 1;
}
public OnPlayerText(playerid, text[])
{
if(IsPlayerConnected(playerid))
if(PlayerMuted[playerid] == true)
return SendClientMessage(playerid, -1, "You must spawn before you chat");
return 1;
}
I dont know if it works.. didnt test it
|
It says that I have to spawn to talk but it still lets me talk.
Re: How can I make people in class selection muted and unmuted when spawning? -
Psymetrix - 05.04.2012
return 0 (zero) under OnPlayerText to stop there text reaching the chat.
pawn Код:
public OnPlayerText(playerid, text[])
{
if(PlayerMuted[playerid] == true)
{
SendClientMessage(playerid, -1, "You must spawn before you chat");
// Stop there text reaching the chat
return 0;
}
// Allow them to chat when not muted
return 1;
}