17.03.2012, 11:21
now i have this problem.
I go databaasi he does not show it there numrbit characters.
Please help me
Code:
CMD:setplate(playerid, params[]) { new string[STR_MAX]; new plate[32]; new vehicleid = GetPlayerVehicleID(playerid); new i = GetBuyCarId(playerid); if(sscanf(params, "s", plate)) { SendClientMessage(playerid, WHITE, "SYNTAX: /setplate [Plate Name]"); } else { format(string, sizeof(string), "You have set your vehicle's plate to %s", plate); SendClientMessage(playerid, 0xFF000AA, string); CarInfo[i][cLicense] = plate; SetVehicleNumberPlate(GetPlayerVehicleID(playerid), plate); SetVehicleToRespawn(vehicleid); PutPlayerInVehicle(playerid, vehicleid, 0); OnCarUpdate(i); } return 1; }
Code:
funktsioon OnCarUpdate(i) { new sql[512]; format(sql, sizeof(sql), "UPDATE cars SET Owned = '%d', Owner = '%d', License = '%d' WHERE CarId = '%d'", CarInfo[i][cOwned], CarInfo[i][cOwner], CarInfo[i][cLicense], i); mysql_query(sql); return 1; }
Please help me