Hallo Community ich brauche schnelle hilfe,
mein /m(megaphone) habe ich im script eingefügt doch es kommen errors, sendername =wass soll ich da machen ?
if(strcmp(cmdtext, "/megaphone", true) == 0 || strcmp(cmdtext, "/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 text]");
return 1;
}
if(isPlayerInFrakt(playerid,1))
{
if(!IsACopCar(tmpcar))
{
SendClientMessage(playerid, COLOR_GRAD2, " Du bist nicht in einem Polizei Auto !");
return 1;
}
if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1)
{
format(string, sizeof(string), "[Officer %s:o< %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:o< %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), "[Soldat %s:o< %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, " Du bist kein Teil eines Teams !");
return 1;
}
}
return 1;
}
C:\Users\Alfarano\Desktop\^^Samp Server ^^\gamemodes\Reallife.pwn(6497) : error 017: undefined symbol "sendername"
C:\Users\Alfarano\Desktop\^^Samp Server ^^\gamemodes\Reallife.pwn(6497) : error 017: undefined symbol "sendername"
C:\Users\Alfarano\Desktop\^^Samp Server ^^\gamemodes\Reallife.pwn(6497) : error 029: invalid expression, assumed zero
C:\Users\Alfarano\Desktop\^^Samp Server ^^\gamemodes\Reallife.pwn(6497) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.