13.12.2014, 08:31
I have a problem with my chat here is the code
When i type anything nothing happen and no thing apear please help.
PHP код:
public OnPlayerText(playerid, text[])
{
if(Muted[playerid] == 1)
{
SendClientMessage(playerid,0x3FA63CFF,"You're muted by an Administrator, you may not speak.");
return 0;
}
new pname[24], str[128];
GetPlayerName(playerid, pname, 24);
if(gTeam[playerid] == TEAM_GS) {
format(str, sizeof(str), "%s: {FFFFFF}%s", pname, text);
ProxDetector(10.0, playerid, str, COLOR_GREEN, COLOR_GREEN, COLOR_GREEN, COLOR_GREEN, COLOR_GREEN);
}
if(gTeam[playerid] == TEAM_SBF) {
format(str, sizeof(str), "%s: {FFFFFF}%s", pname, text);
ProxDetector(10.0, playerid, str, COLOR_LIGHTGREEN, COLOR_LIGHTGREEN, COLOR_LIGHTGREEN, COLOR_LIGHTGREEN, COLOR_LIGHTGREEN);
}
if(gTeam[playerid] == TEAM_TDF) {
format(str, sizeof(str), "%s: {FFFFFF}%s", pname, text);
ProxDetector(10.0, playerid, str, COLOR_DARKGREEN, COLOR_DARKGREEN, COLOR_DARKGREEN, COLOR_DARKGREEN, COLOR_DARKGREEN);
}
if(gTeam[playerid] == TEAM_FYB) {
format(str, sizeof(str), "%s: {FFFFFF}%s", pname, text);
ProxDetector(10.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
}
if(gTeam[playerid] == TEAM_RHB) {
format(str, sizeof(str), "%s: {FFFFFF}%s", pname, text);
ProxDetector(10.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
}
if(gTeam[playerid] == TEAM_KTB) {
format(str, sizeof(str), "%s: {FFFFFF}%s", pname, text);
ProxDetector(10.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
}
if(gTeam[playerid] == TEAM_TDB) {
format(str, sizeof(str), "%s: {FFFFFF}%s", pname, text);
ProxDetector(10.0, playerid, str, 0xFF80FFFF, 0xFF80FFFF, 0xFF80FFFF, 0xFF80FFFF, 0xFF80FFFF);
}
if(gTeam[playerid] == TEAM_VAGOS) {
format(str, sizeof(str), "%s: {FFFFFF}%s", pname, text);
ProxDetector(10.0, playerid, str, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
}
if(gTeam[playerid] == TEAM_VARIOS) {
format(str, sizeof(str), "%s: {FFFFFF}%s", pname, text);
ProxDetector(10.0, playerid, str, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF);
}
if(gTeam[playerid] == TEAM_DRUG) {
format(str, sizeof(str), "%s: {FFFFFF}%s", pname, text);
ProxDetector(10.0, playerid, str, 0x970000FF, 0x970000FF, 0x970000FF, 0x970000FF, 0x970000FF);
}
if(gTeam[playerid] == TEAM_GD) {
format(str, sizeof(str), "%s: {FFFFFF}%s", pname, text);
ProxDetector(10.0, playerid, str, 0xFF8000FF, 0xFF8000FF, 0xFF8000FF, 0xFF8000FF, 0xFF8000FF);
}
if(gTeam[playerid] == TEAM_LSPD) {
format(str, sizeof(str), "%s: {FFFFFF}%s", pname, text);
ProxDetector(10.0, playerid, str, 0x8080FFFF, 0x8080FFFF, 0x8080FFFF, 0x8080FFFF, 0x8080FFFF);
}
if(gTeam[playerid] == TEAM_HOODRAT) {
format(str, sizeof(str), "%s: {FFFFFF}%s", pname, text);
ProxDetector(10.0, playerid, str, 0xC0C0C0FF, 0xC0C0C0FF, 0xC0C0C0FF, 0xC0C0C0FF, 0xC0C0C0FF);
}
if(gTeam[playerid] == TEAM_LTMC) {
format(str, sizeof(str), "%s: {FFFFFF}%s", pname, text);
ProxDetector(10.0, playerid, str, 0x808000FF, 0x808000FF, 0x808000FF, 0x808000FF, 0x808000FF);
}
////////////////////////
return 0; //
}