Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:suggestions(playerid, params[])
- {
- if(PlayerInfo[playerid][Level] >= 6)
- {
- new Query[256],string[145],Handle[2500],spn[MAX_PLAYER_NAME];
- format(Query, sizeof(Query), "SELECT * FROM 'SUGGESTIONS'");
- new DBResult:Result = db_query(bans, Query);
- if(db_num_rows(Result)) {
- for(new i = 0; i < db_num_rows(Result); i++) {
- new suggestion[250], SDate[MAX_PLAYER_NAME], day, month, year;
- GetPlayerName(playerid, spn, sizeof(spn));
- db_get_field_assoc(Result, "PLAYER", spn, sizeof(spn));
- db_get_field_assoc(Result, "DATE", SDate, sizeof(SDate));
- db_get_field_assoc(Result,"SUGGESTION", suggestion, sizeof (suggestion));
- format(string, sizeof(string), "%s - %s by %s\n",suggestion,SDate,spn);
- strcat(Handle, string);
- db_next_row(Result);
- }
- ShowPlayerDialog( playerid, 0, DIALOG_STYLE_MSGBOX, "Suggestions List", Handle, "Close", "" );
- SendCommandToAdmins(playerid, "Suggestions");
- } else SendClientMessage(playerid, -1,"NO Suggestion FOund On DB!");
- db_free_result(Result);
- } else return SendClientMessage(playerid,0xFF0000AA,"ERROR: You must be level 6 to use this commands");
- }
Advertisement
Add Comment
Please, Sign In to add comment