Sziasztok!
Ha válaszolok valakinek valamiért többször adja be ezt.
Pl.: FõAdmin vagyok.
FõAdmin Tomasso: Szöveg
FõAdmin Tomasso: Szöveg
FõAdmin Tomasso: Szöveg
Ha pl. Tulaj:
Tulaj Tomasso: Szöveg
Tulaj Tomasso: Szöveg
Tehát többször ugyanazt leírja a másiknak csak nemtudom miért :S
if(strcmp(cmd, \"/válasz\", true) == 0 || strcmp(cmd, \"/vá\", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, \"Használat: /válasz [Játékos név/ID] [Üzeneted]\");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(!Admin(playerid, 1) && PlayerInfo[playerid][pHelper] != 1 && PlayerInfo[playerid][orokas] != 1)
return Msg(playerid, \"Nem vagy admin[segéd].\");
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= \' \'))
{
idx++;
}
new offset = idx;
new result[128];
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, \"Használat: /válasz [Játékos név/ID] [Üzeneted]\");
return 1;
}
if(PlayerInfo[playerid][pAdmin] == 1)
format(string, sizeof(string), \"Admin %s: %s\", sendername, result);
SendClientMessage(giveplayerid, COLOR_GREEN, string);
if(PlayerInfo[playerid][pAdmin] == 2)
format(string, sizeof(string), \"Admin %s: %s\", sendername, result);
SendClientMessage(giveplayerid, COLOR_GREEN, string);
if(PlayerInfo[playerid][pAdmin] == 3)
format(string, sizeof(string), \"Admin %s: %s\", sendername, result);
SendClientMessage(giveplayerid, COLOR_GREEN, string);
if(PlayerInfo[playerid][pAdmin] == 4)
format(string, sizeof(string), \"FõAdmin %s: %s\", sendername, result);
SendClientMessage(giveplayerid, COLOR_GREEN, string);
if(PlayerInfo[playerid][pAdmin] == 5)
format(string, sizeof(string), \"FõAdmin %s: %s\", sendername, result);
SendClientMessage(giveplayerid, COLOR_GREEN, string);
if(PlayerInfo[playerid][pAdmin] == 6)
format(string, sizeof(string), \"Super Admin %s: %s\", sendername, result);
SendClientMessage(giveplayerid, COLOR_GREEN, string);
if(PlayerInfo[playerid][pAdmin] == 7)
format(string, sizeof(string), \"Tulajdonos %s: %s\", sendername, result);
SendClientMessage(giveplayerid, COLOR_GREEN, string);
if(PlayerInfo[playerid][pAdmin] ==
format(string, sizeof(string), \"Scripter %s: %s\", sendername, result);
SendClientMessage(giveplayerid, COLOR_GREEN, string);
if(PlayerInfo[playerid][pHelper] == 1)
format(string, sizeof(string), \"AdminSegéd %s: %s\", sendername, result);
SendClientMessage(giveplayerid, COLOR_GREEN, string);
if(PlayerInfo[playerid][orokas] == 1)
format(string, sizeof(string), \"AdminSegéd %s: %s\", sendername, result);
SendClientMessage(giveplayerid, COLOR_GREEN, string);
format(string, sizeof(string), \"%s válaszolt neki: %s | Válasz: %s\", sendername, giveplayer, (result));
ABroadCast(COLOR_YELLOW2, string, 1);
return 1;
}
}
else
{
format(string, sizeof(string), \"Hibás Játékos Név/ID.\");
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}