28.01.2010, 15:07
hey i need help here i am triyng to onplayerupdate save position in a database here is my code
He show meee the pos in the Consolee of the server.. but no decimals like 1250.20545 show me 45121542128 i think there is an error with the types of variables.. and another problem iss doesnt update the database
Код:
public GuardarPos(playerid) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); new qry[128]; new pname[MAX_PLAYER_NAME]; GetPlayerName(playerid, pname, sizeof(pname)); printf("%i cambio su posicion: x: %d y: %d z: %d",playerid, x, y, z); format(qry, sizeof(qry), "UPDATE `evo`.`jugadores` SET `Px` ='%d' `Py` ='%d' `Pz` ='%d' WHERE `jugadores`.`Nombre` ='%s' LIMIT 1", x, y, x, pname); }