28.03.2015, 18:33
(
Последний раз редактировалось DetoNater; 28.03.2015 в 21:48.
)
Here I have the old code which is supported in old mysql, i want it to convert it to new mysql,
I need help in converting to new mysql r39 format. I knew new mysql makes scripting alot easier...
eg:
this is the way the code looks, convert this to new mysql format
I need help in converting to new mysql r39 format. I knew new mysql makes scripting alot easier...
eg:
this is the way the code looks, convert this to new mysql format
pawn Код:
createClanDialog(playerid)
{
new content[975];
new Clan[7],score;
new query[80],string[10];
mysql_format(mysql,query,sizeof(query),"SELECT `Clan`,`Clanscore` FROM `clans` ORDER BY `Clanscore` DESC LIMIT 30");
mysql_query(query);
mysql_store_result();
if(mysql_num_rows() > 0)
{
while(mysql_fetch_row(string,"|"))
{
sscanf(string,"p<|>s[7]i",Clan,score);
format(content,sizeof(content),"%s%s\t\t%d Score\n",content,Clan,score);
}
}
else if(AdminLevel{playerid} < 4) return SendLangMessage(playerid, _COLOR_RED, "Es gibt keine Clans!","There are no Clans!","No hay clanes!");
mysql_free_result();
if(AdminLevel{playerid} >= 4)
{
switch(Sprache[playerid])
{
case 0: format(content, sizeof(content), "%sClan hinzufьgen\n", content);
case 1: format(content, sizeof(content), "%sAdd Clan\n", content);
case 2: format(content, sizeof(content), "%sAgregar clan\n", content);
}
}
switch(Sprache[playerid])
{
case 0: ShowPlayerDialog(playerid,2001,DIALOG_STYLE_LIST,"Clan Liste",content,"Akzeptieren", "Abbruch");
case 1: ShowPlayerDialog(playerid,2001,DIALOG_STYLE_LIST,"Clan List",content,"Accept", "Cancel");
case 2: ShowPlayerDialog(playerid,2001,DIALOG_STYLE_LIST,"Lista del clan",content,"Aceptar","Cerrar");
}
return 1;
}