18.08.2009, 00:07
hello, does any one know how to prevent people from talking unless they spawn? , like onplayerconnect make player not able to talk or send pm intill th ey SPAWN?
public OnPlayerText(playerid, text[])
{
if(!IsPlayerConnected(playerid))
{
SendClientMessage(playerid,c_r,"[ ! ] You cannot speak, you are not in-game !");
return 0;
}
return 1;
}
new dontspeak[MAX_PLAYERS];
dontspeak[playerid] = 1;
public OnPlayerText(playerid, text[])
{
if(dontspeak[playerid] == 1)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "You can't speak now, please spawn first!");
return 0;
}
return 1;
}
dontspeak[playerid] = 0;
Originally Posted by |∞|-Рцппσĵσ-|∞|
On top of the script.
pawn Код:
pawn Код:
pawn Код:
pawn Код:
|
dontspeak[playerid] = 1;
Originally Posted by ilikepie2221
For OnPlayerDisconnect you'd need
pawn Код:
|
Originally Posted by ilikepie2221
For OnPlayerDisconnect you'd need
pawn Код:
|
Originally Posted by XeoN_13
it worked but only for id 0 i think , when other players connect it does let t hem talk
|
Originally Posted by XeoN_13
hello, does any one know how to prevent people from talking unless they spawn?
|
public OnPlayerText(playerid, text[])
{
if(GetPlayerState(playerid) == 7) return SendClientMessage(playerid, 0xFFFFFFAA, "You must spawn first!");
// 7 - Player is wasted or on class selection
return 1;
}