moin, ich hab ein Teamchat system, wo aber leider momentan ohne /t funktioniert, wen ich einfach ein / davor mache bekomm ich errors..
wie macht man aus nur "t" ein "/t" ?
public OnPlayerText(playerid, text[])
{
if (text[0] == 't')
{
new playerTeam = gTeam[playerid];
new string [128];
new color;
GetPlayerName(playerid, string, sizeof string);
format(string,sizeof(string),"Teamchat (t [text]) %s: %s",string,text[1]);
switch (playerTeam) {
case TEAM_COP: color = 0xFF0000B2;
case TEAM_RUSSIA: color = 0xFF0000B2;
case TEAM_TRIADEN: color = 0xFF0000B2;
case TEAM_ITAL: color = 0xFF0000B2;
case TEAM_BIKER: color = 0xFF0000B2;
case TEAM_GROVE: color = 0xFF0000B2;
case TEAM_BALLAS: color = 0xFF0000B2;
case TEAM_AZTECAS: color = 0xFF0000B2;
case TEAM_RIFA: color = 0xFF0000B2;
case TEAM_ARMY: color = 0xFF0000B2;
case TEAM_SANITATER: color = 0xFF0000B2;
case TEAM_FBI: color = 0xFF0000B2;
case TEAM_PILOT: color = 0xFF0000B2;
case TEAM_ZIVI: color =0xFF0000B2;
}
for (new i; i < MAX_PLAYERS; i++) {
if (gTeam[i] == playerTeam) {
SendClientMessage(i,color,string);
}
}
return 0;
}
return 1;
}