14.12.2014, 17:38
i manage to get sql updated with this code but i have wrong values if i put 22 on dialog i got 50 on sql if i put 99 on dialog sql update to 57
Код:
if(dialogid == AGEMENU) { if(response) { if(strlen(inputtext)>=2) { //sql new name[MAX_PLAYER_NAME],query[128]; GetPlayerName(playerid,name,sizeof(name)); format(query,sizeof(query),"UPDATE accounts SET page = '%d' WHERE name='%s'", inputtext,name); mysql_function_query(sqlconnect,query,false,"",""); //-------- ShowPlayerDialog(playerid, EMAILMENU, DIALOG_STYLE_INPUT, "{00C0FF}El.pasto adresas", "{FFFFFF}Iveskite savo el.pasto adresa ?\n\n{FFF1AF}El.pasto adresas bus reikalingas jeigu pamirsite slaptazodi", "Submit", "Cancel"); } else { SendClientMessage(playerid,COLOR_RED,"Neivedete amziaus arba jusu amzius nera tinkamas "); ShowPlayerDialog(playerid, AGEMENU, DIALOG_STYLE_INPUT, "{00C0FF}Amzius", "{FFFFFF}Kiek jums metu ?", "Submit", "Cancel"); } return 1; }