23.08.2014, 13:44
Look.
In "LoadPlayer" function i have for int..
But how can i load an string and ip from database?
i tried , but it's not working..
+ Also can somebody explain me how to put an ip into a textdraw? ... i tried
but is not working... ? i mean isn't loading the ip , the textdraw is only IP : *nothing there*
+ How can i save the IP FROM PLAYER?
instead of 127.0.0.1 in database is saved 2552555?!
i save them in this way..
+1 for the one who help me , with these problems... is the frist time i try to save & load an string.. + an ip..
In "LoadPlayer" function i have for int..
Код:
PlayerInfo[ playerid ][ pPosZ ] = cache_get_field_content_float( 0, "sPosZ", SQL );
i tried , but it's not working..
Код:
PlayerInfo[ playerid ][ Tag ] = cache_get_field_content_int( 0, "TAG", SQL ); PlayerInfo[ playerid ][ IP ] = cache_get_field_content_int( 0, "IP", SQL );
Код:
format(string, sizeof(string),"IP: ~R~%s", PlayerInfo[playerid][IP]);
+ How can i save the IP FROM PLAYER?

i save them in this way..
Код:
new plrIP[128]; GetPlayerIp(playerid, plrIP, sizeof(plrIP)); format( query7, sizeof( query7 ), "UPDATE `users` SET `IP` = '%s', `tApartament` = %d, `tMasina` = %d, `TAG` = '%s' WHERE `Name` = '%s'", plrIP, PlayerInfo[playerid][tApartament], PlayerInfo[playerid][tMasina], PlayerInfo[playerid][Tag], name);