01.11.2009, 09:07
Hello people ...
I've got a serious problem.
I'm migrating my server to MySQL more'm having some unexpected ...
When I use the command / register (register) my samp-server closes ...
Anybody know what and?
Sorry for my bad English, I'm Brazilian and ****** TRANSLATOR sucks [: D]
I've got a serious problem.
I'm migrating my server to MySQL more'm having some unexpected ...
When I use the command / register (register) my samp-server closes ...
Код:
if(strcmp(cmd,"/registrar", true) == 0) { new senha[256]; new tmp[256]; new query[256]; tmp = strtok(cmdtext, idx); senha = tmp; if(!strlen(tmp)) { SendClientMessage(playerid, cor_verde,"Uso: /registrar senha"); } else { mysql_real_escape_string(senha, senha); format(query, 256,"SELECT * FROM jogadores WHERE nome LIKE '%s'",PlayerName(playerid)); mysql_query(query); new rows = mysql_num_rows(); if(!rows) { jogador[logado][playerid] = 1; format(query, 256, "INSERT INTO 'jogadores' VALUES(null, '%s', '%s', '%d', '%d', '%d', '%d')", PlayerName(playerid), senha, 0, 4000, 0, 0); new qquery = mysql_query(query); if(qquery) { SendClientMessage(playerid, cor_azul,"Vocк acaba de ser registrado e logado"); printf("OK"); } else printf("Error!"); } } return 1; }
Sorry for my bad English, I'm Brazilian and ****** TRANSLATOR sucks [: D]