CMD:report(playerid, params[]){new aName[MAX_PLAYER_NAME], reason, iD;if (sscanf(params, \"dz\", iD, reason)) return SendClientMessage(playerid, SARGA, \"Használat: /report [id] [indok]\");if (iD == INVALID_PLAYER_ID) return SendClientMessage(playerid, PIROS, \"A Játékos nincs csatlakoztatva!\");if (playerid == iD) return SendClientMessage(playerid, PIROS, \"Magadat Nem jelentheted fel!\");GetPlayerName(iD, aName, sizeof(aName));for (new i = 0; i < MAX_PLAYERS; i++){if (GetPVarInt(i,\"Level\") < 1){format(str, sizeof(str), \"%s(%d) feljelentette %s(%d) indok: %s\", pName(playerid), playerid, aName, iD, reason);MessageToAdmins(0x99FF00AA,str);}}return 1;}forward MessageToAdmins(color,const string[]);public MessageToAdmins(color,const string[]){for(new i = 0; i < MAX_PLAYERS; i++){if(IsPlayerConnected(i) == 1) if (GetPVarInt(i,\"Level\") < 1) SendClientMessage(i, color, string);}return 1;}
#include <a_samp>#include <zcmd>#include <sscanf2>#define MAX_REPORTS 30#define REPS \"Alap\"new repstring[MAX_REPORTS][128];public OnFilterScriptInit(){for(new r; r<MAX_REPORTS; r++){repstring[r] = \"Alap\";}return 1;}CMD:report(playerid,params[]){new szoveg[128],kovrep = KovRep();if(sscanf(params,\"s[128]\",szoveg)) return SendClientMessage(playerid,-1,\"Használat: /report [szöveg]\");format(repstring[kovrep],128,\"%s reportja: %s\",GetName(playerid),szoveg);SendAdminMessage(repstring[kovrep]);SendClientMessage(playerid,-1,\"Jelentés elküldve.\");return 1;}CMD:valasz(playerid,params[]){new szoveg[128],kovrep,m[128];if(!IsPlayerAdmin(playerid)) return 1;if(sscanf(params,\"is[128]\",kovrep,szoveg)) return SendClientMessage(playerid,-1,\"Használat: /valasz [reportid] [szöveg]\");if(Compare(repstring[kovrep],\"Alap\")) return SendClientMessage(playerid,-1,\"Nincs ilyen report. Reportid-k: /reports\");SendClientMessageToAll(-1,repstring[kovrep]);format(m,128,\"[Admin] %s válasza: %s\",GetName(playerid),szoveg);SendClientMessageToAll(-1,m);repstring[kovrep] = \"Alap\";SendClientMessage(playerid,-1,\"Válasz elküldve.\");return 1;}CMD:reportorol(playerid,params[]){new repid;if(sscanf(params,\"i\",repid)) return SendClientMessage(playerid,-1,\"Használat: /reportorol [reportid]\");for(new r; r<MAX_REPORTS; r++){if(Compare(repstring[r],\"Alap\")) return SendClientMessage(playerid,-1,\"Nincs ilyen report! (/reports)\");repstring[repid] = \"Alap\";SendClientMessage(playerid,-1,\"Report törölve!\");}return 1;}CMD:reports(playerid,params[]){new s[128];if(!IsPlayerAdmin(playerid)) return 1;for(new r; r<MAX_REPORTS; r++){if(!Compare(repstring[r],\"Alap\")){ format(s,128,\"| REPORTID: %d |\",r); SendClientMessage(playerid,-1,s); SendClientMessage(playerid,-1,repstring[r]);}}return 1;} stock Compare(comp[], with[]) // By: Florian{new LenghtComp = strlen(comp);new LenghtWith = strlen(with);new Character;if( LenghtComp != LenghtWith ) return false;for( new i = 0; i < LenghtComp; i++ ){if( comp == with ){ Character++;}}if( LenghtComp == Character ) return true;return false;}stock GetName(playerid){new n[MAX_PLAYER_NAME];GetPlayerName(playerid,n,sizeof(n));return 1;}stock SendAdminMessage(msg[]){for(new i; i<MAX_PLAYERS; i++){if(IsPlayerAdmin(i)){ SendClientMessage(i,-1,msg);}}return 1;}stock KovRep(){for(new r; r<= MAX_REPORTS; r++) if(Compare(repstring[r],\"Alap\")) return r;return 1;}