13.09.2015, 03:38
pawn Код:
CMD:djs(playerid,params[]) {
static String[160], String2[160];
static leban[64];
format(leban,sizeof(leban),"SELECT * FROM `Djs` WHERE DjLevel < 1");
mysql_query(mysql, leban);
mysql_store_result();
for(new i = 0; i < MAX_PLAYERS; i++) {
new DjLevelName[30];
if(DjLevel[i] >= 1) {
if(DjLevel[i] == 1) DjLevelName = "Civil";
if(DjLevel[i] == 2) DjLevelName = "Dj";
if(mysql_num_rows() > 0) {
static result[100],djname[25],djlevel,djdia,djmes,djano;
if(mysql_fetch_row(result)) {
sscanf(result,"p<|>s[25]dddd",djname,djlevel,djdia,djmes,djano);
}
format(String,sizeof(String),"%s[%d] - Dj Desde: %d/%d/%d\n",djname,djlevel,djdia,djmes,djano);
strcat(String2, String);
ShowPlayerDialog(playerid, DIALOG_DJS, DIALOG_STYLE_INPUT, "Djs Online",String2,"Pedir", "");
return 0;
}
mysql_free_result();
}
}
return 1;
}