Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:report(playerid,params[])
- {
- new report;
- new File:reports=fopen("report.txt", io_append );
- if(!params[0] || !(report = chrfind(' ', params) + 1) || !params[report]) return SendClientMessage(playerid,COL_CMD, "POUŽIJ: /report [ID] [Důvod]");
- if(strlen(params[report]) > 24) return SendClientMessage(playerid,COL_ER,"CHYBA: Důvod je moc dlouhý");
- new reported = strval(params);
- if(!IsPlayerConnected(reported)) return SendClientMessage(playerid,COL_ER,"CHYBA: Hráč není přijpojen");
- new string[128];
- format(string, 128, "Hráč %s nahlásil hráče %s důvod %s", GetName(playerid),GetName(reported), params[report]);
- for(new i;i < MAX_PLAYERS;i++)
- {
- if(PlayerInfo[playerid][pAdmin] < 1)
- {
- SendClientMessage(i,COL_ER,string);
- }
- }
- print(string);
- fwrite(reports, string);
- fclose(reports);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement