14.07.2011, 17:29
ok heres my OnPlayerStateChange
Im using, mysql system loading the vehicles etc.. , everything works fine but only that 1 thing...,
my vehicle MasinaInfo[playerid][OstetudMasin] is 1 , but it say's like its 0... even the mysql_log says that it has been loaded as 1
Runs this function , even if vehicle OstetudMasin enum is 1
So what's the problem?
, loading saving, inserting works fine, only this thing.
Код:
public OnPlayerStateChange(playerid, newstate, oldstate) { new Autoid = GetPlayerVehicleID(playerid); new string[128]; if(newstate == 2) //sхitja { // --------------------------------------------------------------------------------------------------------------- // /*for(new m = 0; m < sizeof(MasinaInfo); m++) {*/ // ------------------------------------- // if(MasinaInfo[Autoid][MasinOstetud] == 0) { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, PUNANE, "See masin on mььgis, Seda masinat ei tohiks olla!"); } // ------------------------------------- // // ------------------------------------- // if(MasinaInfo[Autoid][MasinOstetud] == 1) { format(string,sizeof(string),"Sхiduki omanik: %s", MasinaInfo[Autoid][MasinOstetud]); SendClientMessage(playerid, VALGE, string); if(Kasutaja[playerid][MasinaV6ti] != Autoid) { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, PUNANE, "Sul pole selle sхiduki vхtmeid!"); } if(Kasutaja[playerid][MasinaV6ti] == Autoid) { SendClientMessage(playerid, VALGE, "See on sinu sхiduk!"); } // ------------------------------------- // /*}*/ // --------------------------------------------------------------------------------------------------------------- // } } return 1; }
Im using, mysql system loading the vehicles etc.. , everything works fine but only that 1 thing...,
my vehicle MasinaInfo[playerid][OstetudMasin] is 1 , but it say's like its 0... even the mysql_log says that it has been loaded as 1
Runs this function , even if vehicle OstetudMasin enum is 1
Код:
if(MasinaInfo[Autoid][MasinOstetud] == 0) { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, PUNANE, "See masin on mььgis, Seda masinat ei tohiks olla!"); }
Код:
[20:31:06] >> mysql_fetch_field_row( Connection handle: 1 ) [20:31:06] CMySQLHandler::FetchField("Ostetud") - 1
, loading saving, inserting works fine, only this thing.