Sziasztok.
Már mindenki tudja,hogy nekem ez a LT-s /report 6asay /asayy nagyon kellene.
Hát most ide fel is rakom Desert Towns módjából,csak az a baj,hogy egy két hejen,kikéne venni szerintem egy-két dolgot,mert én már FS be meg akartam csinálni.
Ezért most ide be is rakom,és remélem segítetek.
És ezt a témát most azért nyitottam újra,mert eddig csak így senkisem tudott írni.De ha én ide felrakom,akkor talán tudtok segíteni.
[pawn] if(strcmp(cmd, \"/asayy\", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(Admin(playerid, 1) || PlayerInfo[playerid][pHelper] >= 1)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, \"HASZNÁLAT: /asayy [iD] [üzenet]\");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(!strcmp(Reportja[giveplayerid], \"None\", true)) return SendClientMessage(playerid,COLOR_LIGHTRED,\"Nem írt reportot!\");//töröld ha bugos
if (IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
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[130];
new adminuzi[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: /asayy [iD] [üzenet]\");
return 1;
}
new h,mi,s,y,m,d;
getdate(y,m,d);
gettime(h,mi,s);
new atext[20];
if(Admin(playerid, 1)) {atext = \"Admin\"; }
else if(PlayerInfo[playerid][pHelper] >= 1) {atext = \"Adminsegéd\"; }
UzenetMindenkinek(0xFFDB26FF, \"%s jelentése: %s\", giveplayer, Reportja[giveplayerid]);
format(stringx,sizeof(stringx), \"[%d/%d/%d][%d:%d:%d] %s jelentése: %s\",y,m,d,h,mi,s,giveplayer, Reportja[giveplayerid]);
LoOoG(stringx);
if(strlen(result) < 65 && PlayerInfo[playerid][rejtozes] == 0)
{
format(adminuzi, sizeof(stringx), \"* %s %s: %s\",atext, sendername, result);
SendClientMessageToAll(COLOR_GREEN,adminuzi);
format(adminuzi,sizeof(stringx), \"[%d/%d/%d][%d:%d:%d] * %s %s: %s\",y,m,d,h,mi,s,atext,sendername,result);
LoOoG(adminuzi);
return 1;
}
else if(strlen(result) < 129 && strlen(result) > 64 && PlayerInfo[playerid][rejtozes] == 0)
{
new stringxxx[65];
strmid(stringxxx, result, 65, strlen(result));
strdel(result, 65, strlen(result));
format(adminuzi, sizeof(stringx), \"* %s %s: %s...\",atext, sendername, result);
SendClientMessageToAll(COLOR_GREEN,adminuzi);
format(stringx, sizeof(stringx), \"[%d/%d/%d][%d:%d:%d] * %s %s: %s...\",y,m,d,h,mi,s, atext, sendername, result);
LoOoG(stringx);
format(adminuzi, sizeof(stringx), \"* %s %s: ...%s\",atext, sendername, stringxxx);
SendClientMessageToAll(COLOR_GREEN,adminuzi);
format(stringx, sizeof(stringx), \"[%d/%d/%d][%d:%d:%d] * %s %s: ...%s\",y,m,d,h,mi,s, atext, sendername, stringxxx);
LoOoG(stringx);
return 1;
}
else if(strlen(result) < 65 && PlayerInfo[playerid][rejtozes] == 1)
{
format(adminuzi, sizeof(stringx), \"* Admin: %s\",atext, result);
SendClientMessageToAll(COLOR_GREEN,adminuzi);
format(adminuzi,sizeof(stringx), \"[%d/%d/%d][%d:%d:%d] * %s %s: %s\",y,m,d,h,mi,s,atext,sendername,result);
LoOoG(adminuzi);
return 1;
}
else if(strlen(result) < 129 && strlen(result) > 64 && PlayerInfo[playerid][rejtozes] == 1)
{
new stringxxx[65];
strmid(stringxxx, result, 65, strlen(result));
strdel(result, 65, strlen(result));
format(adminuzi, sizeof(stringx), \"* Admin: %s...\", result);
SendClientMessageToAll(COLOR_GREEN,adminuzi);
format(stringx, sizeof(stringx), \"[%d/%d/%d][%d:%d:%d] * %s %s: %s...\",y,m,d,h,mi,s, atext, sendername, result);
LoOoG(stringx);
format(adminuzi, sizeof(stringx), \"* Admin: ...%s\", stringxxx);
SendClientMessageToAll(COLOR_GREEN,adminuzi);
format(stringx, sizeof(stringx), \"[%d/%d/%d][%d:%d:%d] * %s %s: ...%s\",y,m,d,h,mi,s, atext, sendername, stringxxx);
LoOoG(stringx);
return 1;
}
/*format(string, sizeof(string), \"* %s %s: %s\",atext,sendername, (result));
strdel(Reportja[giveplayerid], 0, strlen(Reportja[giveplayerid]));
SendClientMessageToAll(COLOR_GREEN, string);*/
//itt volt a return 1
}
}
else
{
format(string, sizeof(string), \"Nem aktív játékos.\");
SendClientMessage(playerid, COLOR_GRAD1, string);
}
} else SendClientMessage(playerid,COLOR_GRAD2,\"Nem vagy admin!\");
}
return 1;
}
if(strcmp(cmd, \"/report\", true) == 0)//innen jön a /report
{
if(IsPlayerConnected(playerid))
{
if(TudReportolni[playerid] > 0) return SendClientMessage(playerid, COLOR_GRAD2, \"10 Másodpercenként tudsz reportot írni!\");
if(IsPlayerConnected(playerid))
{
if(reporttiltva[playerid] == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= \' \'))
{
idx++;
}
new offset = idx;
new result[100];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD1, \"HASZNÁLAT: /report [üzenet]\");
return 1;
}
if(strlen(result) < 80 )
{
format(string, sizeof(string), \"[%d] %s jelentése: %s\", playerid, sendername, (result));
TudReportolni[playerid] = 1;
SetTimerEx(\"Reporttimer\", 10000, false, \"i\", playerid);
//ABroadCast(COLOR_RED,string,1);
for(new x = 0; x < MAX_PLAYERS; x++)
{
if(Admin(x, 1) || PlayerInfo
{
SendClientMessage(x, 0xFFFF00AA, string);
}
}
strmid(Reportja[playerid], result, 0, strlen(result));
SendClientMessage(playerid, 0xFFFF00AA, \"Jelentésed elküldve az adminoknak!\");
format(stringx, sizeof(stringx), \"%s jelentése: %s\", sendername, result);
SendClientMessage(playerid, 0xFFFF00AA, stringx);
new nev[32];
GetPlayerName(playerid, nev, sizeof(nev));
new h,mi,s,y,m,d;
getdate(y,m,d);
gettime(h,mi,s);
format(stringx,sizeof(stringx), \"[%d/%d/%d][%d:%d:%d] %s jelentése: %s\",y,m,d,h,mi,s,nev,result);
LoOoG(stringx);
}
else SendClientMessage(playerid,COLOR_GRAD2,\"Túl hosszú a reportod, kicsit tömörebben fogalmazz!\");
}
else SendClientMessage(playerid,COLOR_GRAD2,\"Letiltottak a reportolásról!\");
}
}
return 1;
}[/pawn]
U.I FS be szeretném rakatni!