[Ajuda] Salvar Vida
#4

coloque como float quando for criar a tabela use o float

PHP код:
CREATE TABLE IF NOT EXISTS `Contas` (`Vidafloat NOT NULL, `Xfloat NOT NULL, `Yfloat NOT NULL, `Zfloat NOT NULL, `Afloat NOT NULL// se quiser colocar default '-' eu nгo utilizei pq acho que n vai ficar legal. :z default na vida 100.0 seria bom! :) sei lб. 
Mesma coisa com as Posiзхes na hora de dar update use '%f' ou '%0.3f'

PHP код:
new Float:VidaFloat:Pos[4];
GetPlayerHealth(playeridVida);
GetPlayerPos(playeridPos[0], Pos[1], Pos[2]);
GetPlayerFacingAngle(playeridPos[3]);
mysql_format(DB_CONEXAOgstringsizeof(gstring), "UPDATE `Contas` SET `Vida` = %f, `X` = %f, `Y` = %f, `Z` = %f `A` = %f WHERE `ID` = %d"VidaPos[0], Pos[1], Pos[2], Pos[3], PlayerInfo[playerid][pID]); 
Reply


Messages In This Thread
Salvar Vida - by powerths - 09.08.2018, 23:32
Re: Salvar Vida - by DelK - 09.08.2018, 23:40
Re: Salvar Vida - by powerths - 09.08.2018, 23:47
Re: Salvar Vida - by SIZET - 10.08.2018, 00:07
Re: Salvar Vida - by powerths - 10.08.2018, 00:13
Re: Salvar Vida - by SIZET - 10.08.2018, 00:17
Re: Salvar Vida - by MtPlayerZ - 10.08.2018, 14:20

Forum Jump:


Users browsing this thread: 1 Guest(s)