Hi SAMP Forum,
Ich habe einproblem mit meinem Megaphone es klappt zwar alles aber im game mache ich /megaphone dann kommt kein text
hier mal die zeilen
if(strcmp(cmd, "/megaphone", true) == 0 || strcmp(cmd, "/m", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new tmpcar = GetPlayerVehicleID(playerid);
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "Benutze: (/m)egaphone [megaphone chat]");
return 1;
}
if(gTeam[playerid] == 1 || IsACop(playerid))
{
if(!IsALSPDCar(tmpcar))
{
SendClientMessage(playerid, COLOR_GRAD2, " Du bist in keinem Polizei Auto !");
return 1;
}
if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1) if(PlayerInfo[playerid][pMember] == 2 ||PlayerInfo[playerid][pLeader] == 2)
{
format(string, sizeof(string), "[Officer %s: %s]", sendername, result);
ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
}
else if(PlayerInfo[playerid][pMember] == 2||PlayerInfo[playerid][pLeader] == 2)
{
format(string, sizeof(string), "[Agent %s: %s]", sendername, result);
ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
}
else if(PlayerInfo[playerid][pMember] == 3||PlayerInfo[playerid][pLeader] == 3)
{
format(string, sizeof(string), "[Soldier %s: %s]", sendername, result);
ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
}
printf("%s", string);
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, " You are not part of a Team !");
return 1;
}
}
return 1;
}
//EDIT//
kann mir keiner helfen ist wichtig??
//MEGA EDIT//
HELFT MIR DOCH MAL BITTE EINER!!!//