Quote:
Originally Posted by JaTochNietDan
That's because pass is a variable, it needs to be a string.
Also I've taken the liberty of re-writing this for you in dcmd/sscanf, I think it's alot easier/cleaner.
pawn Код:
dcmd_login(playerid,params[]) { new password[20]; if(sscanf(params,"s",password)) SendClientMessage(playerid,red,"Usage: /login <password>"); else { new query[128], name[24]; GetPlayerName(playerid,name,sizeof(name)); mysql_escape_string(password,password); format(query,sizeof(query),"SELECT id FROM `players` WHERE Nombre = '%s' AND Password = '%s'",name,password); mysql_query(query); mysql_store_result(); if(mysql_num_rows() > 0) { //And you can continue on here yourself ;)
You need dcmd and sscanf, which are popular functions all over the forums 
|
much thanks but i dont know how to use that code u use dcmd_login i use if(cmdtext... :S