18.10.2011, 11:05
Here is onplayerText:
pawn Код:
public OnPlayerText(playerid, text[])
{
new tmp[128];
new string[128];
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s: ID:%d TEXT: %s", sendername, playerid, text);
TextLog(string);
if (gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "[SERVER]: You are not logged in.");
return 0;
}
else if(BenchPresses[playerid] != 0)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "You cannot use this while bench pressing.");
return 0;
}
else if(Hospitalized[playerid] == 1)
{
SendClientMessage(playerid, COLOR_LIGHTRED, " You cannot do this right now !");
return 0;
}
else if(Mute[playerid] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "You cannot speak, you have been silenced");
return 0;
}
else if(UsingSpawnBar[playerid] > 0)
{
SendClientMessage(playerid, COLOR_LIGHTRED, " You cannot do this right now !");
return 0;
}