06.04.2011, 08:10
Man,all is at wiki,or search ******,for report command,its easy,here you got:
On the top of FS
//OnPlayerCommandText:
On the top of FS
Code:
new LastReport[MAX_PLAYERS];
Code:
if(strcmp(cmdtext, "/report", true, 7)==0) { if(!strlen(cmdtext[8])) return SendClientMessage(playerid, 0xFF0000AA, "Use /report [message]"); new str[128]; if((gettime()-LastReport[playerid]) < 30) { format(str, 128, "You have to wait %d seconds before you can send a new report!", (30-(gettime()-LastReport[playerid]))); SendClientMessage(playerid, 0xFF0000AA, str); return 1; } format(str, 128, "[REPORT] Sender ID: %d. Message: %s", playerid, cmdtext[8]); for(new i; i<MAX_PLAYERS; i++){ if(IsPlayerConnected(i) && IsPlayerAdmin(i)){ SendClientMessage(i, 0x00FFFFAA, str); }} SendClientMessage(playerid, 0x00FF00AA, "Report send to online admins!"); LastReport[playerid] = gettime(); return 1; }